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

[modeller_usage] optimize.py



Dear

I am trying to do energy minimization step by running optimize.py script file but it does not execute every time i tried to run and got the following error, i will be thankful if you help me get this problem resolved.

IOError: pdbnam_____E> Filename for PDB code not found: hGLR
              Directories: ../atom_files
              Extensions : :.atm:.pdb:.ent:.crd
              (Also tried prepending 'pdb', looking for .Z, .gz, .bz2, .7z, .xz,
              and trying PDB-style subdirectories - e.g. ab for pdb1abc.ent)



# Example for: conjugate_gradients(), molecular_dynamics(), model.switch_trace()

# This will optimize stereochemistry of a given model, including
# non-bonded contacts.


# non-bonded contacts.

from modeller import *
from modeller.scripts import complete_pdb
from modeller.optimizers import conjugate_gradients, molecular_dynamics, actions

env = environ()
env.io.atom_files_directory = ['../atom_files']
env.edat.dynamic_sphere = True

env.libs.topology.read(file='$(LIB)/top_heav.lib')
env.libs.parameters.read(file='$(LIB)/par.lib')

code = 'hGLR'
mdl = complete_pdb(env, code)
mdl.write(file=code+'.ini')

# Select all atoms:
atmsel = selection(mdl)

# Generate the restraints:
mdl.restraints.make(atmsel, restraint_type='stereo', spline_on_site=False)
mdl.restraints.write(file=code+'.rsr')

mpdf = atmsel.energy()

# Create optimizer objects and set defaults for all further optimizations
cg = conjugate_gradients(output='REPORT')
md = molecular_dynamics(output='REPORT')

# Open a file to get basic stats on each optimization
trcfil = file(code+'.D00000001', 'w')

# Run CG on the all-atom selection; write stats every 5 steps
cg.optimize(atmsel, max_iterations=20, actions=actions.trace(5, trcfil))
# Run MD; write out a PDB structure (called '1fas.D9999xxxx.pdb') every
# 10 steps during the run, and write stats every 10 steps
md.optimize(atmsel, temperature=300, max_iterations=50,
            actions=[actions.write_structure(10, code+'.D9999%04d.pdb'),
                     actions.trace(10, trcfil)])
# Finish off with some more CG, and write stats every 5 steps
cg.optimize(atmsel, max_iterations=20,
            actions=[actions.trace(5, trcfil)])

mpdf = atmsel.energy()

mdl.write(file=code+'.B')

I am trying to give the code which i have got after my pdb files are dveveloped.
--
MUSTAFA BUGHIO

Junior Research Fellow
Lab # P-133
Computational Medicinal Chemistry and Drug Design
Panjwani Center For Molecular Medicine and Drug Research, International
Center for Chemical Sciences, University of Karachi, Karachi 75270
Pakistan, +923313425010