Get missing heavy atoms#
Identifying missing non-hydrogen heavy atoms in a molecular system.
Structures solved by experimental methods such as X-ray crystallography often contain missing heavy atoms due to resolution limits or local disorder. The function molsysmt.build.get_missing_heavy_atoms() compares residues with exact chemical templates to identify missing non-hydrogen atoms. MSE, SEP, TPO, and MLY have exact component templates; other modified residues without one are absent from the returned missing-atom mapping. Detection does not guarantee that a missing atom can be placed safely. An empty mapping alone does not certify that every residue is complete.
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.get_missing_heavy_atoms().
Basic usage#
Let’s show how this function works using a protein structure loaded from PDB ID 1BRS:
import molsysmt as msm
molsys = msm.convert('1BRS', selection='molecule_type=="protein"')
msm.info(molsys, element='molecule')
| index | name | type | n atoms | n groups | n components | chain index | entity index | entity name |
|---|---|---|---|---|---|---|---|---|
| 0 | BARNASE | protein | 864 | 108 | 1 | 0 | 0 | BARNASE |
| 1 | BARNASE | protein | 878 | 110 | 1 | 1 | 0 | BARNASE |
| 2 | BARNASE | protein | 839 | 108 | 1 | 2 | 0 | BARNASE |
| 3 | BARSTAR | protein | 693 | 87 | 2 | 3 | 1 | BARSTAR |
| 4 | BARSTAR | protein | 665 | 86 | 2 | 4 | 1 | BARSTAR |
| 5 | BARSTAR | protein | 699 | 89 | 1 | 5 | 1 | BARSTAR |
We now use molsysmt.build.get_missing_heavy_atoms() to detect missing non-hydrogen atoms across all residues:
missing_heavy_atoms = msm.build.get_missing_heavy_atoms(molsys)
missing_heavy_atoms
{234: ['CD', 'CE', 'CG', 'NZ'],
237: ['CG', 'OD1', 'OD2'],
244: ['CD', 'OE1', 'OE2'],
246: ['CD', 'CG', 'NE2', 'OE1'],
254: ['CD', 'CE', 'NZ'],
260: ['CG1', 'CG2'],
264: ['CD', 'CE', 'CG', 'NZ'],
282: ['OG'],
325: ['O'],
383: ['NE2', 'OE1'],
385: ['NZ'],
386: ['CD', 'CG', 'NE2', 'OE1'],
422: ['CZ', 'NE', 'NH1', 'NH2'],
429: ['CD', 'CG', 'NE2', 'OE1'],
465: ['CZ', 'NE', 'NH1', 'NH2'],
469: ['CD', 'CG', 'NE2', 'OE1'],
471: ['CD', 'CE', 'CG', 'NZ'],
472: ['CD', 'CG', 'NE2', 'OE1'],
473: ['CD1', 'CD2', 'CG'],
520: ['CD', 'CE', 'NZ'],
526: ['CD', 'CG', 'OE1', 'OE2'],
544: ['CD', 'CG', 'OE1', 'OE2'],
562: ['CD', 'CG', 'OE1', 'OE2'],
563: ['CG', 'ND2', 'OD1'],
587: ['O']}
We can identify which molecules contain these missing heavy atoms:
residue_indices = list(missing_heavy_atoms.keys())
molecule_indices = msm.get(molsys, element='molecule', selection='group_index in @residue_indices', molecule_index=True)
msm.info(molsys, element='molecule', selection='molecule_index in @molecule_indices')
| index | name | type | n atoms | n groups | n components | chain index | entity index | entity name |
|---|---|---|---|---|---|---|---|---|
| 2 | BARNASE | protein | 839 | 108 | 1 | 2 | 0 | BARNASE |
| 3 | BARSTAR | protein | 693 | 87 | 2 | 3 | 1 | BARSTAR |
| 4 | BARSTAR | protein | 665 | 86 | 2 | 4 | 1 | BARSTAR |
| 5 | BARSTAR | protein | 699 | 89 | 1 | 5 | 1 | BARSTAR |
Finally, let’s check if the system has hydrogen atoms using molsysmt.build.has_hydrogens():
msm.build.has_hydrogens(molsys)
False
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().Get missing heavy atoms: Identify missing non-hydrogen heavy atoms with
molsysmt.build.get_missing_heavy_atoms().Get: Retrieve attribute values from a molecular system with
molsysmt.basic.get().Has hydrogens: Check whether a molecular system contains hydrogen atoms with
molsysmt.build.has_hydrogens().Add missing heavy atoms: Reconstruct missing non-hydrogen heavy atoms with
molsysmt.build.add_missing_heavy_atoms().