Add missing hydrogens#
Adding missing hydrogen atoms to a molecular system.
Many molecular systems lack hydrogen atoms or require protonation adjustments to reflect a specific chemical or physical environment. The function molsysmt.build.add_missing_hydrogens() adds missing hydrogen atoms to any molecular system based on standard protonation rules and residue templates at a specified pH.
Added in version 1.0.0.
API documentation
Follow this link for a detailed description of the input arguments, raised errors, and returned objects of this function: molsysmt.build.add_missing_hydrogens().
Basic usage#
Let’s show how this function works using a protein structure loaded from T4 lysozyme (PDB ID: 181L):
import molsysmt as msm
molsys = msm.convert('181L', selection='molecule_type=="protein"')
msm.info(molsys)
| form | n_atoms | n_groups | n_components | n_chains | n_molecules | n_entities | n_proteins | n_structures |
|---|---|---|---|---|---|---|---|---|
| molsysmt.MolSys | 1289 | 162 | 1 | 1 | 1 | 1 | 1 | 1 |
This protein system was obtained from a PDB X-ray structure and does not contain hydrogen atoms. Let’s verify this using molsysmt.build.has_hydrogens():
msm.build.has_hydrogens(molsys)
False
Now we add the missing hydrogen atoms using standard protonation patterns at pH 7.4:
molsys = msm.build.add_missing_hydrogens(molsys, pH=7.4)
Let’s confirm the addition of hydrogen atoms by counting how many atoms of type 'H' are now present:
msm.get(molsys, element='atom', selection='atom_type=="H"', n_atoms=True)
1313
See also
Related Tools & References
Convert: Convert molecular systems between different forms with
molsysmt.basic.convert().Info: Display structural and topological summaries of a molecular system with
molsysmt.basic.info().Has hydrogens: Check whether a molecular system contains hydrogen atoms with
molsysmt.build.has_hydrogens().Add missing hydrogens: Add missing hydrogen atoms to a molecular system with
molsysmt.build.add_missing_hydrogens().Get: Retrieve attribute values from a molecular system with
molsysmt.basic.get().Add missing heavy atoms: Reconstruct missing non-hydrogen heavy atoms with
molsysmt.build.add_missing_heavy_atoms().