Merge#

Merging elements from multiple molecular systems.

Elements coming from different molecular systems can be merged in a new molecular system with the molsysmt.basic.merge() function.

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

Let’s demonstrate how this function works using three peptides, each defined as a separate molecular system: proline dipeptide (\(A\)), valine dipeptide (\(B\)), and lysine dipeptide (\(C\)).

import molsysmt as msm
molsys_A = msm.build.build_peptide('AceProNme')
molsys_B = msm.build.build_peptide('AceValNme')
molsys_C = msm.build.build_peptide('AceLysNme')

To prevent overlaps when merging, the systems \(B\) and \(C\) are translated in space before being combined with \(A\).

molsys_B = msm.structure.translate(molsys_B, translation='[-1.0, 0.0, 0.0] nanometers')
molsys_C = msm.structure.translate(molsys_C, translation='[1.0, 0.0, 0.0] nanometers')
molsys_D = msm.merge([molsys_A, molsys_B, molsys_C])

Tip

All methods defined in the molsysmt.basic module can be invoked also from the main level of the library. Thus, molsysmt.merge() is simply an alias of molsysmt.basic.merge().

Let’s now inspect the contents of the merged system \(D\):

msm.info(molsys_D)
form n_atoms n_groups n_components n_chains n_molecules n_entities n_peptides n_structures
molsysmt.MolSys 88 9 3 3 3 1 3 1
msm.view(molsys_D, standard=True)

See also

User guide > Tools > Build > Build peptide:
Build peptides from amino acid sequences.

User guide > Tools > Structure > Translate:
Translate molecular systems or selected elements in space.

User guide > Tools > Basic > Info:
Display summary tables of a molecular system.

User guide > Tools > Basic > View:
Visualize molecular systems in 3D.

User guide > Tools > Basic > Add:
Add elements from one system into another.