This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Calculate Distance Between Two Superposed Equivalent Atoms

So I can superpose two structures with modeller using the following code:

    def get_rmsd(self, template, model_strucutre):

    from modeller import *

    # Create the environment and append alignment for template
    env = environ()
    aln = alignment(env)
    mdl = model(env, file='./modeller/templates/'+template)
    aln.append_model(mdl, align_codes='Temptlate = %s' % template[-8:], atom_files='Template')

    # Create model environment and append to alignment
    mdl2 = model(env, file='./modeller/models/'+model_strucutre)
    aln.append_model(mdl2, align_codes='model = %s' % model_strucutre, atom_files='Model')
    aln.align(gap_penalties_1d=(-600, -400))
    aln.write(file=model_strucutre[:-4]+'.ali')
    atmsel = selection(mdl).only_atom_types('CA')
    r = atmsel.superpose(mdl2, aln)
    rms = r.rms
    drms = r.drms
    aln.clear()

When it calculates the RMSD is must know the distance between two equivalent C-alpha atoms. Is there away of extracting the distance between two equivalent C-alpha atoms?

modeling

I think both 'superposed" and 'superimposed' is correct...

1 answer

I don't know if they are actually stored somewhere, but you can retrieve them by iterating over the atoms and calculating from the coordinates manually. Check here or here.

Log in to answer this question.