molsysmt.build.solve_atoms_with_alternate_location#
- molsysmt.build.solve_atoms_with_alternate_location(molecular_system, selection='all', structure_indices='all', location_id='occupancy', syntax='MolSysMT')[source]#
Resolving alternate-location atoms in selected structures.
- Parameters:
molecular_system (molecular system) – Molecular system carrying alternate-location metadata.
selection (str, list, tuple, or numpy.ndarray, default 'all') – Atoms whose alternate locations are resolved.
structure_indices (int, list of int, or 'all', default 'all') – Structures in which coordinates and B factors are updated.
location_id (str, list, tuple, or numpy.ndarray, default 'occupancy') – Location identifier to choose.
'occupancy'chooses independently in every structure. A sequence supplies one identifier per selected atom.syntax (str, default 'MolSysMT') – Syntax used to interpret a string selection.
- Returns:
The molecular system is modified in place.
- Return type:
None
Notes
Coordinates use the units already normalized by MolSysMT, normally nm. B factors are stored in nm². When occupancies tie at 0.5, location
Ais preferred when available.See also
molsysmt.basic.get()Getting alternate-location metadata.
Examples
>>> import molsysmt as msm >>> from importlib.resources import files >>> filename = str(files('molsysmt.data.pdb').joinpath('1bnf.pdb')) >>> molecular_system = msm.convert( ... filename, to_form='molsysmt.MolSys', get_missing_bonds=False ... ) >>> solve_atoms_with_alternate_location( ... molecular_system, selection=[480], location_id='A' ... ) >>> molecular_system.structures.coordinates.shape[0] 1
Tutorial with more examples
Added in version 1.0.0.