Hi Renuka,

If I understand correctly, this is what you want to do:

1. Load up all of the cluster*.sdf files in Model_1.
2. Analyze them
3. Delete them
4. Load up all of the cluster*.sdf files in Model_2.
5. Analyze them
6. Delete them
etc.

If that's right, I think the easiest thing is just to change to the
directory that contains your Model_N subdirectories. In your example, that
would be:

cd /home/user
import glob

then load the Model_1 files with

for i in glob.glob("Model_1/cluster_*.sdf"): cmd.load(i)

then analyze them. It sounds like you're analyzing them by hand; if you're
analyzing them by running some scripts, we can probably help to automate
that process as well.

After analyzing them, (and saving your results!), you'll want to delete the
current batch of cluster files and load the new ones:

delete cluster_*
for i in glob.glob("Model_2/cluster_*.sdf"): cmd.load(i)

Note that you only have to type "import glob" once.

Hope that helps,

-Michael

On Wed, Sep 22, 2010 at 9:12 AM, Renuka Robert <renukarob...@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
>



-- 
Michael Lerner, Ph.D.
IRTA Postdoctoral Fellow
Laboratory of Computational Biology NIH/NHLBI
5635 Fishers Lane, Room T909, MSC 9314
Rockville, MD 20852 (UPS/FedEx/Reality)
Bethesda MD 20892-9314 (USPS)
------------------------------------------------------------------------------
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

Reply via email to