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 in any supported MolSysMT format.
selection (str, list, tuple, or numpy.ndarray, default='all') – Selection string or boolean/integer array specifying elements.
structure_indices (int, list, tuple, or numpy.ndarray, default='all') – Structure indices (0-based) to include or process.
location_id (object, default='occupancy') – Argument location_id.
syntax (str, default='MolSysMT') – Selection syntax used to evaluate selection (e.g., ‘MolSysMT’, ‘MDTraj’).
- 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
See UserGuide_Tools_Build_SolveAtomsWithAlternateLocations.
Added in version 1.0.0.