[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [modeller_usage] dope batch processing



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
-- 
             http://www.salilab.org/modeller/
Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage