Path A - Module 23: Structural Repair & Mutagenesis#

Once you know what is broken, you must fix it. In this module, you will transform a raw experimental model into a complete, clean, and modified system ready for molecular engineering.

You will repair the Amyloid-Beta fibril and perform your first Virtual Mutation to test a hypothesis.

import molsysmt as msm
from molsysmt import systems

# Load the fibril as a native object
molsys = msm.convert('pdb:2BEG', to_form='molsysmt.MolSys')

1. Adding Missing Pieces#

Based on our previous audit, we know if atoms are missing. Let’s make the model physically complete by adding heavy atoms and hydrogens.

# Add missing heavy atoms (sidechains)
msm.build.add_missing_heavy_atoms(molsys)

# Add hydrogens (essential for H-bonds and physics)
msm.build.add_missing_hydrogens(molsys, pH=7.4)

print(f"Final number of atoms: {msm.get(molsys, element='system', n_atoms=True)}")

2. Virtual Mutagenesis#

The fibril core is held together by hydrophobic interactions, often involving residues like Phenylalanine (PHE). Let’s see what happens if we mutate a PHE to an Alanine (ALA) to reduce the hydrophobic drive.

# Let's find a PHE in the first chain
phe_res = msm.select(molsys, selection='chain_index==0 and group_name=="PHE"', element='group')
print(f"Phenylalanines found at indices: {phe_res}")

# Mutate the first PHE (usually index 18 in Aβ) to Alanine
msm.build.mutate(molsys, selection='group_index=='+str(phe_res[0]), new_group_name='ALA')\n
# Verify the mutation
new_name = msm.get(molsys, element='group', selection='group_index=='+str(phe_res[0]), group_name=True)
print(f"Residue at index {phe_res[0]} is now: {new_name[0]}")

3. Cleaning Overlaps#

Mutations or adding atoms can sometimes create “clashes” (atoms too close to each other). MolSysMT can detect and help you resolve these structural conflicts.

# In a real pipeline, you would minimize energy next, 
# but for now, let's just check for overlapping molecules.
msm.build.remove_overlapping_molecules(molsys, selection='molecule_type=="water"', 
                                      targets='molecule_type=="protein"', threshold='1.5 angstroms')

🏆 Path A Challenge: The Protein Surgeon#

  1. Take your repaired and mutated molsys object.

  2. Perform a double mutation: change two different residues of the same chain to Glycine (GLY).

  3. Use msm.info(element='group') to verify that the changes were applied correctly.

  4. Visualize the mutated region in 3D.

You have successfully modified a biological system! In Module 24, we will learn how to synthesize a completely new peptide from a string sequence.