Apr 7, 2010

Load Multiple Molecules Simultaneously









This is one method. There are many. Specifically, this is useful for opening multiple pdb or pdbqt files at the same time. People who are docking or doing molecular dynamics (MD) use scripts like this all the time. This is just one....

1. In PMV, open the Python Shell.




2. Type "import glob", hit enter.
3. Type "fl = glob.glob("/Users/yourUserNamer/MoleculeFolder/*.pdb")", hit enter. The asterisk tells PMV to find and use anything ending in ".pdb"

4. Type "len(fl)", hit enter. This is a check that your script is working. What appears afterword should be a number- specifically the number of PDBs you
wish to import. In this example, I am loading 15 molecules.


5. Type "for x in fl: self.readMolecule(x)", hit enter. A string of blue should show up indicating each loaded PDB file.



Then choose you representation and enjoy!




0 comments:

 
Powered by Blogger