Path A - Module 29: PDB Bioassemblies & AltLocs#
To finish your preparation as a Molecular Architect, you must master the two “hidden” features of the PDB format: Alternate Locations and Biological Assemblies. PDB paths and PDB text share the native PDBFileHandler, so every native target receives the same normalized records and diagnostics.
If you ignore these, your simulations might crash or you might be studying only a fragment of the real protein.
import molsysmt as msm
from molsysmt import systems
1. Solving Alternate Locations (AltLocs)#
In high-resolution X-ray structures, some atom sites can be observed in two or more positions labeled A, B, and so on. MolSysMT represents each site once in the topology, activates the variant with the highest occupancy (preferring A on ties), and retains every variant in Structures.alternate_location. Resolving a variant changes its active data; it does not change the number of canonical atom sites.
# Let's use a different PDB that is known to have AltLocs (e.g., 181L)
molsys_alt = msm.convert('pdb:181L', to_form='molsysmt.MolSys')
print(msm.get(molsys_alt, alternate_location=True))
# Solve them (it keeps the default 'A' or the highest occupancy)
msm.build.solve_atoms_with_alternate_location(molsys_alt)
print("Alternate locations resolved without changing the topology atom count.")
2. Making the Biological Assembly#
Sometimes, the PDB file only contains the “Asymmetric Unit” (e.g., one chain), but the functional protein is a tetramer. MolSysMT reads REMARK 350 operators as native rotations and nanometer translations. Atom extraction remaps the referenced chains, and PDB round trips retain the selected assembly instructions.
# 2BEG is already a full assembly, but let's try to trigger the logic
fibril = msm.convert('pdb:2BEG', to_form='molsysmt.MolSys')
full_fibril = msm.build.make_bioassembly(fibril)
msm.info(full_fibril, element='chain')
🏁 END OF PHASE 3: THE VIRTUAL LAB#
Congratulations! You have transformed a raw file into a high-quality, engineered molecular system. You have:
Extracted the target.
Audited the gaps.
Repaired atoms and Mutated residues.
Synthesized a new peptide.
Solvated and added Ions.
Built custom scaffolds and handled Bioassemblies.
Now that your laboratory is ready, it is time to perform science. In Phase 4: Data Analyst, we will start calculating the geometric and physical properties of your complex.