Merge#
Merging elements from multiple molecular systems.
Elements coming from different molecular systems can be merged into a new molecular system with the molsysmt.basic.merge() function.
Added in version 1.0.0.
API documentation
Follow this link for a detailed description of the input arguments, raised errors, and returned objects of this function: molsysmt.basic.merge().
Basic usage#
Let’s show how this function works using three peptides built as separate molecular systems: proline dipeptide (\(A\)), valine dipeptide (\(B\)), and lysine dipeptide (\(C\)):
import molsysmt as msm
import numpy as np
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 also be invoked from the main level of the library. Hence, molsysmt.merge() is the same function as 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 | 3 | 3 | 1 |
msm.view(molsys_D)
See also
Related Tools & References
Build peptide: Build peptides from amino acid sequences with
molsysmt.build.build_peptide().Translate: Translate molecular systems or selected elements in space with
molsysmt.structure.translate().Merge: Merge elements from multiple molecular systems with
molsysmt.basic.merge().Info: Display summary tables of a molecular system with
molsysmt.basic.info().View: Visualize molecular systems in 3D with
molsysmt.basic.view().Add: Add elements from one system into another with
molsysmt.basic.add().