Copy#

Creating independent copies of molecular systems.

The function {func}molsysmt.basic.copy allows you to create a fully independent copy of a molecular system.

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.copy().

Let’s illustrate the use of this function with a simple example:

import molsysmt as msm
molsys = msm.convert('181L', to_form='molsysmt.MolSys')
msm.info(molsys)
form n_atoms n_groups n_components n_chains n_molecules n_entities n_waters n_ions n_small_molecules n_proteins n_structures
molsysmt.MolSys 1441 302 141 6 141 5 136 2 2 1 1
molsys_copy = msm.copy(molsys)

Tip

All methods defined in the molsysmt.basic module can be invoked also from the main level of the library. Hence, molsysmt.copy() is the same method as molsysmt.basic.copy().

Although the original and copied systems are structurally identical, they are stored as distinct Python objects:

id(molsys)!= id(molsys_copy)
True

But they represent the same molecular system:

msm.compare(molsys, molsys_copy, rule='equal')
True
msm.info(molsys_copy)
form n_atoms n_groups n_components n_chains n_molecules n_entities n_waters n_ions n_small_molecules n_proteins n_structures
molsysmt.MolSys 1441 302 141 6 141 5 136 2 2 1 1

See also

User guide > Tools > Basic > Convert:
Convert a molecular system into another form.

User guide > Tools > Basic > Compare:
Compare molecular systems to check identity or equality.

User guide > Tools > Basic > Info:
Display summary information about a molecular system.