[PyMOL] distance between two atoms in all the pdb files in a directory

2009-09-08 Thread pkb bioinfo
Hello Pymol users, I am new to pymol scripting and I want to calculate the distance between two points of all the pdb file in a directory. I tried to write the script but seems its not working. PLease help me. from pymol import cmd from glob import glob lst = glob("*.pdb") lst.sort() for fil in

Re: [PyMOL] distance between two atoms in all the pdb files in a directory

2009-09-08 Thread Tsjerk Wassenaar
Hi pkb bioinfo (which I do hope is not your real name), Did you actually paste the script or did you retype it? > from pymol import cmd > from glob import glob > > lst = glob("*.pdb") > lst.sort() > > for fil in lst: >     cmd.load(fil,"tmp") >     dst=cmd.distance('/tmp//A/LYS`203/NZ','/

Re: [PyMOL] distance between two atoms in all the pdb files in a directory

2009-09-08 Thread Tsjerk Wassenaar
O, and just when I pressed send (which also made firefox crash for some reason), it struck me that you only load files, which means that you're only appending states. But you don't specify a state to calculate the distance, which means the first is taken again and again. You might want to add a lin