Hi,

Try the following in PyMOL's command prompt.

from glob import glob
for file in glob("path/to/data/*.mol2"): cmd.load(file)

Takanori Nakane

On 2014-09-10 11:10, ashika torikora wrote:
> I don't think I understand what glob does or how to use it.
> 
> 2014-09-10 10:59 GMT+02:00 T. Nakane <tn...@cam.ac.uk>:
> 
>> Hi,
>> 
>>> I tried writing a macro where I would use load *.mol2 but that
>>> doesn't
>>> work either.
>> 
>> You can use glob in Python. An example is in the
>> "User Comments/Examples" section of
>> http://www.pymolwiki.org/index.php/Load [4] .
>> 
>> Best regards,
>> 
>> Takanori Nakane
>> 
>> On 2014-09-10 08:56, ashika torikora wrote:
>> 
>>> Hi,
>>> 
>>> I have a bunch of mol2 files that I'm trying to load all at once
>>> in
>>> pymol.
>>> I know you can do that in linux by launching pymol with
>>>> pymol *.mol2
>>> but I'm in windows, so I tried adding pymol's address to my PATH
>>> environmental variable but that didn't allow me to launch pymol
>>> in the
>>> command prompt.
>>> I tried writing a macro where I woul use load *.mol2 but that
>>> doesn't
>>> work either.
>>> 
>>> Thanks for any help you could offer.
>>> 
>> 
> ------------------------------------------------------------------------------
>>> Want excitement?
>>> Manually upgrade your production database.
>>> When you want reliability, choose Perforce
>>> Perforce version control. Predictably reliable.
>>> 
>> 
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
>>> [1]
>>> 
>>> _______________________________________________
>>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>>> Info Page:
>>> https://lists.sourceforge.net/lists/listinfo/pymol-users [2]
>>> Archives:
>>> http://www.mail-archive.com/pymol-users@lists.sourceforge.net [3]
> 
> 
> 
> Links:
> ------
> [1]
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&amp;iu=/4140/ostg.clktrk
> [2] https://lists.sourceforge.net/lists/listinfo/pymol-users
> [3] http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> [4] http://www.pymolwiki.org/index.php/Load

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&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

Reply via email to