This is not a python solution, perhaps there is one, but what I did was to write a bash shell script to modify the python script changing the name of the
model consecutively (might have to be modified for other shells):
# DOPE
for c in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15; do sed 's/NAME/Model_'${c}'/g' model-DOPE.py > tmp.py; mod9v4 tmp.py ; echo "Model "${c}": ";grep 'DOPE' tmp.log >> Models_DOPE.dat; done
In the python script (model-DOPE.py in my case) replace the line
mdl = complete_pdb(env, '1acb.pdb')
with
mdl = complete_pdb(env, 'NAME.pdb')
your previously built models should be named sequentially Model_01 to Model_15 (or the last one in your case), or change the regexp in the sed command above according to your file naming.
At the end you'll have a list of DOPE values in the file Models_DOPE.dat.
Hope this helps...
Message: 1
Date: Thu, 27 Nov 2008 10:03:30 +0800
From: "jinlian" <jinlian05@lzu.cn>
Subject: [modeller_usage] dope batch processing
To: <modeller_usage@salilab.org>
Message-ID: <427750030.20199@lzu.cn>
Content-Type: text/plain; charset="us-ascii"
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!