Hi Renuka,

Check out the loadDir PyMOL script (http://www.pymolwiki.org/index.php/LoadDir).  You can do stuff like,

# load all PDBs in the directory ../
loadDir ../, *.pdb

# load all SDFs in ../../mySDFs
loadDir ../../mySDFs/state*.sdf

Cheers,

-- Jason

On Wed, Sep 22, 2010 at 9:12 AM, Renuka Robert <renukarobert@ymail.com> wrote:

Dear Pymol users


I have to do TWO jobs simultaneously in PYMOL.


JOB 1: Load multiple *sdf files


I have set of ligand files in *.sdf format as follows:


/home/user/Model_1/cluster_1.sdf

/home/user/Model_1/cluster_2.sdf

/home/user/Model_1/cluster_3.sdf


/home/user/Model_2/cluster_1.sdf

/home/user/Model_2/cluster_2.sdf

/home/user/Model_2/cluster_3.sdf


/home/user/Model_3/cluster_1.sdf

/home/user/Model_3/cluster_2.sdf

/home/user/Model_3/cluster_3.sdf


I've got an answer from one of the PYMOL user as:


PyMOL>import glob

PyMOL>for i in glob.glob("cluster_*.sdf"): cmd.load(i)


But this command works only in the present working directory. For the next try I have to change my directory every time. Like:


cd /home/user/Model_1/

PyMOL>import glob

PyMOL>for i in glob.glob("cluster_*.sdf"): cmd.load(i)


cd /home/user/Model_2/

PyMOL>import glob

PyMOL>for i in glob.glob("cluster_*.sdf"): cmd.load(i)


cd /home/user/Model_3/

PyMOL>import glob

PyMOL>for i in glob.glob("cluster_*.sdf"): cmd.load(i)


Could you please tell me how to load these multiple *.sdf files in one command without changing the directory?


JOB2: Delete multiple *.sdf files


I have to analyze cluster_*.sdf files of several 100 directories.


So when I load cluster_*.sdf files from directory Model_2, the already loaded cluster:*.sdf files from Model_1 should be deleted.

Like wise when I load cluster_*.sdf files from directory Model_3, the already loaded cluster:*.sdf files from Model_2 should be deleted.


I am not good in programming. Could anybody help me in scripting to sort out this problem?


Thanks in advance.

Regards

Renuka



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
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



--
Jason Vertrees, PhD
PyMOL Product Manager
Schrodinger, LLC

(e) Jason.Vertrees@schrodinger.com
(o) +1 (603) 374-7120