Module 20: The Specialized Domains#
Congratulations, Master Apprentice! You have completed the technical core of MolSysMT (Modules 01 through 20). You know how to convert, inspect, select, extract, modify, audit, and stream molecular systems across all native and third-party data forms.
Beyond core data management, MolSysMT contains specialized scientific submodules that address physical chemistry, structural analysis, solvated preparation, hydrogen bonding, and molecular dynamics. This capstone module previews The Specialized Domains as you prepare to embark on your chosen Master Path.
Learning Outcomes
By the end of this module, you will be able to:
Navigate the specialized domain submodules of MolSysMT.
Understand the scientific capabilities of
msm.build,msm.structure,msm.topology,msm.physchem,msm.hbonds,msm.pbc,msm.molecular_mechanics,msm.third_party, andmsm.configure.Select your specialized Master Path (Modules 21+).
1. Build Submodule#
The msm.build submodule was formally introduced in Module 12: Building, Repairing and Auditing Systems. It provides tools to repair sequence gaps, mutate residues, solvate, and prepare molecular systems for simulation:
import molsysmt as msm
from molsysmt import systems
# Load T4 Lysozyme file
lysozyme = systems['T4 lysozyme L99A']['181l.bcif.gz']
# Audit sequence gaps or missing heavy atoms
missing = msm.build.get_missing_heavy_atoms(lysozyme)
print(f"Missing heavy atom audit: {len(missing)} residues affected.")
Missing heavy atom audit: 0 residues affected.
2. Structure Submodule#
The msm.structure submodule was formally introduced in Module 16: Structural Operations. It contains geometric alignment, RMSD calculations, principal axis transformations, and spatial contact analysis:
# Load trajectory system
villin_traj = systems['chicken villin HP35']['traj_chicken_villin_HP35_solvated.dcd']
villin_topo = systems['chicken villin HP35']['chicken_villin_HP35_solvated.h5msm']
sys = [villin_topo, villin_traj]
# Calculate RMSD relative to the initial structure
rmsd = msm.structure.get_rmsd(sys, selection='molecule_type == "protein"')
print(f"RMSD series shape across trajectory: {rmsd.shape}")
WARNING: /home/diego/repos@uibcdf/molsysmt/molsysmt/basic/convert.py:295: StructuralAttributeOffAxisWarning: Structural attributes were dropped because only an item outside the structure axis of the molecular system provides them: atom_index, structure_chemical_state_index, structure_id, time. A file holding a single reference conformation cannot supply a series for a whole trajectory. Take the attribute from the trajectory item, or convert first. Docs: https://www.uibcdf.org/MolSysMT
_prune_structural_attributes_off_the_axis(molecular_system, from_forms, from_attributes)
WARNING: /home/diego/repos@uibcdf/molsysmt/molsysmt/basic/convert.py:295: StructuralAttributeOffAxisWarning: Structural attributes were dropped because only an item outside the structure axis of the molecular system provides them: atom_index, structure_chemical_state_index, structure_id, time. A file holding a single reference conformation cannot supply a series for a whole trajectory. Take the attribute from the trajectory item, or convert first. Docs: https://www.uibcdf.org/MolSysMT
_prune_structural_attributes_off_the_axis(molecular_system, from_forms, from_attributes)
WARNING: /home/diego/repos@uibcdf/molsysmt/molsysmt/basic/convert.py:295: StructuralAttributeOffAxisWarning: Structural attributes were dropped because only an item outside the structure axis of the molecular system provides them: atom_index, structure_chemical_state_index, structure_id, time. A file holding a single reference conformation cannot supply a series for a whole trajectory. Take the attribute from the trajectory item, or convert first. Docs: https://www.uibcdf.org/MolSysMT
_prune_structural_attributes_off_the_axis(molecular_system, from_forms, from_attributes)
WARNING: /home/diego/repos@uibcdf/molsysmt/molsysmt/basic/convert.py:295: StructuralAttributeOffAxisWarning: Structural attributes were dropped because only an item outside the structure axis of the molecular system provides them: atom_index, structure_chemical_state_index, structure_id, time. A file holding a single reference conformation cannot supply a series for a whole trajectory. Take the attribute from the trajectory item, or convert first. Docs: https://www.uibcdf.org/MolSysMT
_prune_structural_attributes_off_the_axis(molecular_system, from_forms, from_attributes)
RMSD series shape across trajectory: (20,)
3. Topology Submodule#
The msm.topology submodule was formally introduced in Module 13: Topological Analysis. It manages sequence alignments, covalent graph partitioning, secondary structure assignment, and sequence identity:
# Extract covalent blocks
blocks = msm.topology.get_covalent_blocks(lysozyme)
print(f"Total independent covalent blocks: {len(blocks)}")
Total independent covalent blocks: 141
Note
Upcoming Specialized Submodules in the Master Paths
While msm.build, msm.structure, and msm.topology were introduced in the Common Core, the functions in the remaining specialized submodules below (msm.physchem, msm.hbonds, msm.pbc, msm.molecular_mechanics, and msm.third_party) will be formally introduced and applied throughout the 4 Master Paths (Modules 21 onwards) in your chosen scientific domain.
4. Physchem Submodule#
The msm.physchem submodule calculates physical and chemical properties such as molecular mass, net charge, surface area (SASA), and volume:
# Calculate molecular mass of the system
mass = msm.physchem.get_mass(lysozyme, selection='molecule_type == "protein"')
print(f"Total protein molecular mass: {mass}")
Total protein molecular mass: 19463.619999999995 dalton
5. Hbonds Submodule#
The msm.hbonds submodule provides hydrogen bond detection and acceptor-donor network mapping:
# Select potential hydrogen bond donor/acceptor heteroatoms
polar_atoms = msm.select(lysozyme, selection='atom_type == "O" or atom_type == "N"')
print(f"Polar Nitrogen and Oxygen atoms found: {len(polar_atoms)}")
Polar Nitrogen and Oxygen atoms found: 611
6. PBC and Molecular Mechanics Submodules#
The msm.pbc and msm.molecular_mechanics submodules handle periodic boundary conditions (box vectors, wrapping/unwrapping) and potential energy or force calculations.
7. Third Party Integrations#
The msm.third_party submodule provides direct bridges to OpenMM, MDAnalysis, NGLView, PyTraj, and BioPython.
🏁 Choose Your Scientific Path#
You have mastered the Common Core (Modules 01 to 20). Now select your specialized Master Path to continue your training:
Path A: Protein Dynamics Architect — Complex assemblies, amyloids, and large conformational ensembles.
Path B: Enzyme Engineering — Active site mutations, catalytic loops, and chemical modifications.
Path C: Antiviral Drug Hunter — Ligand binding pockets, virtual screening, and drug discovery.
Path D: Membrane Mechanics — Solvated lipid bilayers, transmembrane channels, and periodic boundary conditions.
See also
API Documentation for Functions in this Module:
molsysmt.basic.extract()— Sub-system extraction engine.molsysmt.basic.remove()— Element removal tool.molsysmt.basic.copy()— Deep system copying tool.
Related Course Modules & Guides:
Previous Module: Module 19: Structures and Trajectories
User Guide: user-foundations