Hi Oliver,
Thanks so much for the reply, especially via your phone!
Thank you for that information; that's great to know. MDAnalysis is becoming my default go-to MD analysis tool kit, so the more information the better :-)
I managed to sort it using the following code:
import MDAnalysis
from MDAnalysis import transformations as trans
outputFile = "C:/Users/yewro/Documents/MINES_LECTURES/superimposed.pdb"
# The backbone structure WITH tetracycline needs to be moved
withTetracycline = "C:/Users/yewro/Documents/MINES_LECTURES/tetracycline_backbones.pdb"
universeWithTetracycline = mda.Universe(withTetracycline)
# The backbone structure WITHOUT tetracycline is the REFERENCE (template) This does not move
withoutTetracycline = "C:/Users/yewro/Documents/MINES_LECTURES/target_backbones.pdb"
universeWithoutTetracycline = mda.Universe(withoutTetracycline)
#move the structure WITH tetracycline onto the structure WITHOUT tetracycline (your MMP1 model)
alignTransformation = trans.fit_rot_trans(universeWithTetracycline, universeWithoutTetracycline,
weights=universeWithTetracycline.atoms.masses)
# apply the new transformation matrix to the complete file (not just the backbones) and then write it out
universeWithTetracycline.trajectory.add_transformations(alignTransformation)
universeWithTetracycline.atoms.write(outputFile)
The only none-MDAnalysis steps were using Gromacs to ensure only common backbone atoms were included.