moorhen-coot / Moorhen

A JavaScript molecular graphics program
https://moorhen.org
BSD 3-Clause "New" or "Revised" License
9 stars 4 forks source link

Add an interface for LSQing #393

Closed pemsley closed 5 months ago

pemsley commented 5 months ago

As discussed 15th May.

pemsley commented 5 months ago
# start a new set of matches
mc.clear_lsq_matches()
# add some matches (typically only one match)
mc.add_lsq_superpose_match('A', 1, 3, 'B', 1, 3, 1)
mc.add_lsq_superpose_match('A', 11, 20, 'B', 11, 20, 1)
mc.add_lsq_superpose_match('A', 101, 103, 'B', 105, 107, 1)
# generate the matrix and apply it to the atoms of imol2
mc.lsq_superpose(imol1, imol2)
# now update the bonds for imol2...