Hi all
I want to use the 'DOPE' to do the filtering the docking structure of thousands of proteins, and I want to do batch possessing, but the script can only calculate one structure:
from modeller import * from modeller.scripts import complete_pdb
env = environ() env.libs.topology.read(file='$(LIB)/top_heav.lib') env.libs.parameters.read(file='$(LIB)/par.lib')
# Read a model previously generated by Modeller's automodel class mdl = complete_pdb(env, '1acb.pdb')
# Select all atoms in the first chain atmsel = selection(mdl.chains[0])
score = atmsel.assess_dope()
I am not familiar with python, Could you tell me how to do the batch processing in the above script? Thank you very much!
jinlian wrote: > I want to use the ‘DOPE’ to do the filtering the docking structure of > thousands of proteins, and I want to do batch possessing, but the script > can only calculate one structure:
Sure - it's an example. It's pretty straightforward to process multiple structures though with some elementary Python (see http://docs.python.org/tutorial/controlflow.html). For example:
from modeller import * from modeller.scripts import complete_pdb
env = environ() env.libs.topology.read(file='$(LIB)/top_heav.lib') env.libs.parameters.read(file='$(LIB)/par.lib')
for filename in ['1acb.pdb', '2xyz.pdb', 'foo.pdb']: # Read a model previously generated by Modeller's automodel class mdl = complete_pdb(env, filename)
# Select all atoms in the first chain atmsel = selection(mdl.chains[0])
score = atmsel.assess_dope()
Of course, the other solution suggested (write a shell script that generates a new Python script for each model) will also work, but will be rather less efficient (since you have to do the Modeller startup and reading of topology and parameter libraries for every model, rather than just once).
Ben Webb, Modeller Caretaker
participants (2)
-
jinlian
-
Modeller Caretaker