Skip to content

Python_MinimizeRMSD

dstoeckel edited this page Mar 16, 2015 · 2 revisions

How can I minimize the RMSD of two Systems?

This can be done with BALL's StructureMapper First, map the two systems onto each other can be done using the StructureMapper.

After successful mapping, the RMSD can be easily computed calling its function calculateRMSD().

# get the first and the second system of BALLView
a = getSystems()[0]
b = getSystems()[1]

# map both systems
sm = StructureMapper(a, b)

# print the previous RMSD
print "Pre-Match RMSD: ", sm.calculateRMSD()

# compute the RMSD of the mapped systems
rmsd = RMSDMinimizer.minimizeRMSD(a, b)

# trigger BALLView to update its scene
getMainControl().updateRepresentationsOf(b)

# and print the mapped RMSD
print "Matched RMSD:", rmsd
Clone this wiki locally