neurosnap.algos.evoef2 module#
A Python implementation of the EvoEF2 protein scoring function / force field. Ported from the native EvoEF2 reference implementation. Original Implementation: tommyhuangthu/EvoEF2
- Metrics (energy terms) and implications:
total: Weighted sum of all terms (lower is more favorable).
reference_*: Per-residue reference energies that encode baseline preferences.
intraR_vdwatt/vdwrep/electr/deslvP/deslvH: Intra-residue nonbonded interactions (packing, electrostatics, and desolvation within a residue).
intraR_hbscbb_*: Intra-residue hydrogen-bond geometry terms.
interS_*: Same-chain (non-adjacent) interactions, capturing packing, electrostatics, desolvation, disulfides, and hydrogen-bond geometries in folded structure.
interD_*: Different-chain interactions for complexes (interface packing, electrostatics, desolvation, disulfides, and hydrogen-bond geometries).
ligand_*: Protein–ligand nonbonded and hydrogen-bond terms.
aapropensity: Amino-acid propensity term from phi/psi bins (sequence–structure compatibility).
ramachandran: Ramachandran backbone conformational preference term.
dunbrack: Sidechain rotamer likelihood term from the Dunbrack library.
In general, more negative terms indicate more favorable interactions, while large positive repulsive terms or unfavorable conformational terms suggest strain or clashes.
- Stability metric interpretation:
The “stability” energy corresponds to the total energy of a single structure. Lower values indicate a more favorable (more stable) fold under this force field.
Binding-related metrics (interface and DG_bind) are computed as differences of stability energies; negative DG_bind implies favorable binding.
- class neurosnap.algos.evoef2.AAppTable(aap)[source]#
Bases:
objectAmino-acid propensity table indexed by phi/psi bins.
- class neurosnap.algos.evoef2.Atom(name, param, chain, pos, res=None, xyz=<factory>, is_xyz_valid=False, is_in_hbond=False, vdw_epsilon=0.0, vdw_radius=0.0, charge=0.0, eef1_free_dg=0.0, eef1_volume=0.0, eef1_lambda=0.0, hb_h_or_a='', hb_d_or_b='', hb_b2='', hybrid='', is_bb=False, polarity='', is_h=False, is_hbond_h=False, is_hbond_a=False)[source]#
Bases:
objectAtom instance with coordinates, parameters, and per-structure state.
- name#
Atom name (e.g., CA, CB, O).
- param#
Parameter record used for scoring.
- chain#
Chain identifier for the parent residue.
- pos#
Residue index within chain (0-based in this structure).
- res#
Parent residue reference (for H-bond donor/base lookup).
- xyz#
Cartesian coordinate in Angstrom.
- is_xyz_valid#
Whether the coordinate is present or reconstructed.
- is_in_hbond#
Flag used during H-bond detection to avoid double counting.
- class neurosnap.algos.evoef2.AtomParam(name, type, is_bb, polarity, epsilon, radius, charge, hb_h_or_a, hb_d_or_b, hb_b2, hybrid, eef1_free_dg, eef1_volume, eef1_lambda)[source]#
Bases:
objectPer-atom parameter record loaded from the EvoEF2 parameter library.
- name#
Atom name as defined in topology.
- type#
Atom type in the parameter file.
- is_bb#
Whether the atom is considered backbone for scoring.
- polarity#
Polarity class used in desolvation.
- epsilon#
Lennard-Jones well depth (kcal/mol).
- radius#
Lennard-Jones radius (Angstrom).
- charge#
Partial charge (e).
- hb_h_or_a#
Hydrogen-bond role flag: H (hydrogen) or A (acceptor).
- hb_d_or_b#
Hydrogen-bond donor/base classification.
- hb_b2#
Secondary hydrogen-bond base flag.
- hybrid#
Hybridization class (e.g., sp2/sp3).
- eef1_free_dg#
EEF1 free energy parameter.
- eef1_volume#
EEF1 volume parameter.
- eef1_lambda#
EEF1 lambda parameter.
- class neurosnap.algos.evoef2.Bond(a, b, bond_type=1)[source]#
Bases:
objectCovalent bond between two atoms inside a residue.
- class neurosnap.algos.evoef2.Chain(name, residues=<factory>, is_protein=True)[source]#
Bases:
objectChain container for residues with an is_protein flag.
- class neurosnap.algos.evoef2.CharmmIC(atom_a, atom_b, atom_c, atom_d, ic_param, torsion_proper)[source]#
Bases:
objectCHARMM internal coordinate (IC) entry used to build missing atoms.
- class neurosnap.algos.evoef2.DunbrackBin(by_residue=<factory>)[source]#
Bases:
objectDunbrack bin for a phi/psi region with rotamer list.
-
by_residue:
Dict[str,List[DunbrackRotamer]]#
-
by_residue:
- class neurosnap.algos.evoef2.DunbrackLibrary(bins)[source]#
Bases:
objectFull Dunbrack library indexed by residue and phi/psi bins.
-
bins:
List[DunbrackBin]#
-
bins:
- class neurosnap.algos.evoef2.DunbrackRotamer(torsions, deviations, probability)[source]#
Bases:
objectSingle Dunbrack rotamer entry with chi statistics.
- class neurosnap.algos.evoef2.RamaTable(rama)[source]#
Bases:
objectRamachandran probability table indexed by phi/psi bins.
- class neurosnap.algos.evoef2.Residue(name, chain, pos, atoms=<factory>, bonds=<factory>, patches=<factory>, phipsi=(0.0, 0.0), n_cb_in_8a=0, is_protein=True, is_nucleic=False, xtorsions=<factory>, na_torsions=<factory>)[source]#
Bases:
objectResidue instance with atoms, bonds, and cached torsions/geometry.
- class neurosnap.algos.evoef2.ResidueTopology(name, atoms=<factory>, deletes=<factory>, bonds=<factory>, ics=<factory>)[source]#
Bases:
objectResidue topology template with atoms, bonds, and ICs from library.
- class neurosnap.algos.evoef2.Structure(chains=<factory>)[source]#
Bases:
objectStructure container holding all chains.
- neurosnap.algos.evoef2.calculate_binding(structure, split1, split2, *, param_path=None, topo_path=None, weight_dict=None, aapropensity_path=None, ramachandran_path=None, dunbrack_path=None)[source]#
Compute interface energy and DG_bind for two chain groups.
- Parameters:
structure (
Union[Protein,str,Path]) – Protein object or PDB/mmCIF path.param_path (
Optional[Path]) – Optional parameter file override.topo_path (
Optional[Path]) – Optional topology file override.weight_dict (
Optional[Dict[str,float]]) – Weights dictionary to use.aapropensity_path (
Optional[Path]) – Optional AA propensity table override.ramachandran_path (
Optional[Path]) – Optional Ramachandran table override.dunbrack_path (
Optional[Path]) – Optional Dunbrack library override.
- Return type:
- Returns:
Dict with interface energy, complex stability, split stabilities, and DG_bind.
- neurosnap.algos.evoef2.calculate_interface_energy(structure, split1, split2, *, param_path=None, topo_path=None, weight_dict=None)[source]#
Compute interface energy between two chain groups.
- Parameters:
- Return type:
- Returns:
Dict of weighted inter-chain energy terms plus the total.
- neurosnap.algos.evoef2.calculate_stability(structure, *, param_path=None, topo_path=None, weight_dict=None, aapropensity_path=None, ramachandran_path=None, dunbrack_path=None)[source]#
Compute EvoEF2 stability energy for a structure.
- Parameters:
structure (
Union[Protein,str,Path]) – Protein object or PDB/mmCIF path.param_path (
Optional[Path]) – Optional parameter file override.topo_path (
Optional[Path]) – Optional topology file override.weight_dict (
Optional[Dict[str,float]]) – Weights dictionary to use.aapropensity_path (
Optional[Path]) – Optional AA propensity table override.ramachandran_path (
Optional[Path]) – Optional Ramachandran table override.dunbrack_path (
Optional[Path]) – Optional Dunbrack library override.
- Return type:
- Returns:
Dict of all weighted energy terms plus the total.
- neurosnap.algos.evoef2.load_aapropensity(path=None)[source]#
Load amino-acid propensity table for phi/psi bins.
- neurosnap.algos.evoef2.load_atom_params(param_path=None)[source]#
Load atom parameters from the EvoEF2 CHARMM19+LK parameter file.
- neurosnap.algos.evoef2.load_dunbrack(path=None)[source]#
Load Dunbrack rotamer library from the EvoEF2 distribution.
- neurosnap.algos.evoef2.load_ramachandran(path=None)[source]#
Load Ramachandran probability table for phi/psi bins.
- neurosnap.algos.evoef2.load_topology(top_path=None)[source]#
Load CHARMM topology definitions for residues and patches.