Is a molecular system#
Verifying whether an object defines a single valid molecular system
A molecular system can be defined using a single item or a list of items. To check whether a given collection defines a valid molecular system, use the function {func}molsysmt.basic.is_a_molecular_system.
But what does “valid” mean in this context? It means that all items can be combined into a single system — without internal inconsistencies — by layering their attributes (e.g., topology, coordinates, box) in a compatible way.
Hint
What is an item? Visit the section User guide > Introduction > Molecular System in case you are not familiar with the concept of “item” in MolSysMT.
Added in version 1.0.0.
How this function works#
API documentation
Follow this link for a detailed description of the input arguments, raised errors, and returned objects of this function:molsysmt.basic.is_a_molecular_system()
.
Let’s illustrate how the function works with a simple example:
import molsysmt as msm
topology = msm.systems['pentalanine']['pentalanine.prmtop']
structures_A = msm.systems['pentalanine']['pentalanine.inpcrd']
structures_B = msm.systems['chicken villin HP35']['traj_chicken_villin_HP35_solvated.dcd']
We have a single item — a *.prmtop file — that by itself defines a molecular system with no structure data:
msm.info(topology)
form | n_atoms | n_groups | n_components | n_chains | n_molecules | n_entities | n_waters | n_peptides | n_structures |
---|---|---|---|---|---|---|---|---|---|
file:prmtop | 5207 | 1722 | 1716 | 1 | 1716 | 2 | 1715 | 1 | None |
We also have two items — an “inpcrd” file and a “dcd” trajectory — which can independently define molecular systems without topological attributes.
msm.info(structures_A)
form | n_atoms | n_groups | n_components | n_chains | n_molecules | n_entities | n_structures |
---|---|---|---|---|---|---|---|
file:inpcrd | 5207 | None | None | None | None | None | 1 |
msm.info(structures_B)
form | n_atoms | n_groups | n_components | n_chains | n_molecules | n_entities | n_structures |
---|---|---|---|---|---|---|---|
file:dcd | 4306 | None | None | None | None | None | 20 |
Can the items topology
and structures_A
be combined to form a valid molecular system?
msm.is_a_molecular_system([topology, structures_A])
True
Tip
All functions in the molsysmt.basic module are also accessible from the top-level namespace of the library. Hence, molsysmt.is_a_molecular_system()
is the same method as molsysmt.basic.is_a_molecular_system()
.
What about combining topology
with structures_B
?
msm.is_a_molecular_system([topology, structures_B])
False
See also
User guide > Introduction > Demo systems > Items:
Explore examples of individual items used in molecular systems.
User guide > Introduction > Molecular System > Items:
Learn how molecular systems are constructed from one or more items.
User guide > Tools > Basic > Info:
Display summary tables of molecular system elements.
User guide > Tools > Basic > Are multiple molecular systems:
Check if a list of objects are valid and independent molecular systems.