debump
Routines for biomolecule optimization.
Code author: Jens Erik Nielsen
Code author: Todd Dolinsky
Code author: Yong Huang
Code author: Nathan Baker
- class pdb2pqr.debump.Debump(biomolecule, definition=None)[source]
Grab bag of random stuff that apparently didn’t fit elsewhere.
Todo
This class needs to be susbtantially refactored in to multiple classes with clear responsibilities.
- __init__(biomolecule, definition=None)[source]
Initialize the Debump object.
- Parameters
biomolecule (Biomolecule) – the biomolecule to debump
definition (Definition) – topology definition file
- debump_biomolecule()[source]
Minimize bump score for molecule.
Make sure that none of the added atoms were rebuilt on top of existing atoms. See each called function for more information.
- Raises
ValueError – if missing (backbone) atoms are encountered
- debump_residue(residue, conflict_names)[source]
Debump a specific residue.
Only should be called if the residue has been detected to have a conflict. If called, try to rotate about dihedral angles to resolve the conflict.
- Parameters
residue (Residue) – the residue in question
conflict_names ([str]) – a list of atomnames that were rebuilt too close to other atoms
- Returns
True if successful, False otherwise
- Return type
bool
- find_nearby_atoms(atom)[source]
Find nearby atoms for conflict-checking.
Uses neighboring cells to compare atoms rather than an all versus all O(n^2) algorithm, which saves a great deal of time. There are several instances where we ignore potential conflicts; these include donor/acceptor pairs, atoms in the same residue, and bonded CYS bridges.
- Parameters
atom (Atom) – find nearby atoms to this atom
- Returns
a dictionary of
Atom too close
toamount of overlap for that atom
- Return type
dict
- find_residue_conflicts(residue, write_conflict_info=False)[source]
Find conflicts between residues.
- Parameters
residue (Residue) – residue to check
write_conflict_info (bool) – write verbose output about conflict
- Returns
list of conflicts
- Return type
[str]
- get_bump_score(residue)[source]
Get a bump score for a residue.
- Parameters
residue (Residue) – residue with bumping to evaluate
- Returns
bump score
- Return type
float
- get_bump_score_atom(atom)[source]
Find nearby atoms for conflict-checking.
Uses neighboring cells to compare atoms rather than an all versus all O(n^2) algorithm, which saves a great deal of time. There are several instances where we ignore potential conflicts; these include donor/acceptor pairs, atoms in the same residue, and bonded CYS bridges.
- Parameters
atom (Atom) – find nearby atoms to this atom
- Returns
a bump score sum((dist-cutoff)**20 for all nearby atoms
- Return type
float
- get_closest_atom(atom)[source]
Get the closest atom that does not form a donor/acceptor pair.
Used to detect potential conflicts.
Note
Cells must be set before using this function.