molsysmt.basic.get_form#
- molsysmt.basic.get_form(molecular_system)[source]#
Retrieving the form of a molecular system.
This function returns a string that identifies the form of the input molecular system, such as
'file:pdb'
,'openmm.Topology'
,'string:pdb_id'
, or any other supported form.- Parameters:
molecular_system (molecular system) – Molecular system to analyze, in any of the supported forms.
- Returns:
Name of the form of the input molecular system.
- Return type:
str
- Raises:
NotSupportedFormError – If the input molecular system has a form that is not supported.
Notes
See Forms for a full list of supported forms.
See also
molsysmt.convert()
Convert a molecular system into a different form.
Examples
>>> import molsysmt as msm >>> from molsysmt import systems >>> molsys_A = systems['T4 lysozyme L99A']['181l.h5msm'] >>> msm.get_form(molsys_A) 'file:h5msm' >>> molsys_B = msm.convert(molsys_A, to_form='molsysmt.MolSys') >>> msm.get_form(molsys_B) 'molsysmt.MolSys' >>> molsys_C = msm.convert(molsys_B, to_form='openmm.Topology') >>> msm.get_form(molsys_C) 'openmm.Topology'
Tutorial with more examples
See the following tutorial for a practical demonstration of how to use this function, along with additional examples: Get form.
Added in version 1.0.0.