On Tue, 2014-01-07 12:05 EST, Jed Goldstone <jgoldst...@whoi.edu> wrote:
> Check out Robert Campbell's Pymol script repository.
> I think align_all_to_all.py should do what you want, including exporting
> RMSD values.
>
> http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/
Actually, I think Om only wants to align the individual mutants to the
wild-type not all 500 mutants against each other which is what the above
script does. Also, I think for 500 structure you probably don't want to
load all 500 in at one time, so it would be better to have a script that
only loads each mutant one at a time, calculates its RMSD to the wild-type
and then deletes it.
I have modified my align_all.py script to create a new one called
align_allfiles.py and added that to the above website. It is also attached
here. To specify the use of all atoms simply add that to the mobile and
target selections. You can also specify PyMOL's cutoff and cycles
arguments to the align function (defaults to cycles=5, cutoff=2)
align_allfiles target_model, files=mutants*.pdb, mobile_selection=all,
target_selection=all
It will print out a list of RMSD values for each mutant in order read in as
well as sorted by RMSD.
Cheers,
Rob
> Jed
>
>
> On 1/7/2014 11:58 AM, Om Shiv wrote:
> > Hello All
> >
> > I am a new user to Pymol and Python.
> >
> > I have a PDB Structure with single chain (A) and I have modeled 500
> > single point mutants of this wild structure.
> >
> > Now for each such 500 modeled structures, I would like to calculate RMSD
> > (ALL ATOMS) with the wild type PDB structure.
> >
> > Can anybody help me with the script to automate calculation of 500 RMSD
> > calculations using PYMOL ?
> >
> > Secondly, what threshold value of RMSD can be considered above which we
> > can say that the mutant structure is considerably different than the
> > wild type ?
> >
> > Thanks in advance.
> >
--
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University,
Kingston, ON K7L 3N6 Canada
Tel: 613-533-6821
<robert.campb...@queensu.ca> http://pldserver1.biochem.queensu.ca/~rlc
#! /usr/bin/env python
# original Written by Jules Jacobsen (jacob...@ebi.ac.uk). Feel free to do whatever you like with this code.
# extensively modified by Robert L. Campbell (r...@queensu.ca)
from pymol import cmd
import glob, re
def align_allfiles(target=None,files=None,mobile_selection='name ca',target_selection='name ca',cutoff=2, cycles=5,cgo_object=0):
"""
Aligns all models in a list of files to one target
usage:
align_allfiles [target][files=<filenames>][target_selection=name ca][mobile_selection=name ca]
[cutoff=2][cycles=5][cgo_object=0]
where target specifies the model id you want to align all others against,
and target_selection, mobile_selection, cutoff and cycles are options
passed to the align command. You can specify the files to load and align
using a wildcard.
By default the selection is all C-alpha atoms and the cutoff is 2 and the
number of cycles is 5.
Setting cgo_object to 1, will cause the generation of an alignment object for
each object. They will be named like <object>_on_<target>, where <object> and
<target> will be replaced by the real object and target names.
Example:
align_allfiles target=name1, files=model.B9999*.pdb, mobile_selection=c. b & n. n+ca+c+o,target_selection=c. a & n. n+ca+c+o
"""
cutoff = int(cutoff)
cycles = int(cycles)
cgo_object = int(cgo_object)
file_list = glob.glob(files)
file_list.sort()
extension = re.compile( '(^.*[\/]|\.(pdb|ent|brk))' )
object_list = []
rmsd = {}
rmsd_list = []
for i in range(len(file_list)):
obj_name1 = extension.sub('',file_list[i])
object_list.append(extension.sub('',file_list[i]))
cmd.load(file_list[i],obj_name1)
if cgo_object:
objectname = 'align_%s_on_%s' % (object_list[i],target)
rms = cmd.align('%s & %s'%(object_list[i],mobile_selection),'%s & %s'%(target,target_selection),cutoff=cutoff,cycles=cycles,object=objectname)
else:
rms = cmd.align('%s & %s'%(object_list[i],mobile_selection),'%s & %s'%(target,target_selection),cutoff=cutoff,cycles=cycles)
rmsd[object_list[i]] = (rms[0],rms[1])
rmsd_list.append((object_list[i],rms[0],rms[1]))
cmd.delete(obj_name1)
rmsd_list.sort(lambda x,y: cmp(x[1],y[1]))
# loop over dictionary and print out matrix of final rms values
print "Aligning against:",target
for object_name in object_list:
print "%s: %6.3f using %d atoms" % (object_name,rmsd[object_name][0],rmsd[object_name][1])
print "\nSorted from best match to worst:"
for r in rmsd_list:
print "%s: %6.3f using %d atoms" % r
cmd.extend('align_allfiles',align_allfiles)
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net