Skip to content

Commit

Permalink
Use Modeller 10 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Jan 18, 2024
1 parent 2b1f821 commit 88c82e2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions modules/modeller/examples/imp_restraints_in_modeller.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
IMP.setup_from_argv(sys.argv, "IMP restraints in Modeller")

# Set up Modeller and build a model from the GGCC primary sequence
e = modeller.environ()
e = modeller.Environ()
e.edat.dynamic_sphere = False
e.libs.topology.read('${LIB}/top_heav.lib')
e.libs.parameters.read('${LIB}/par.lib')
modmodel = modeller.model(e)
modmodel = modeller.Model(e)
modmodel.build_sequence('GGCC')

# Set up IMP and load the Modeller model in as a new Hierarchy
Expand All @@ -37,5 +37,5 @@
t.append(IMP.modeller.IMPRestraints(atoms, sf))

# Calculate the Modeller energy (score) for the whole protein
sel = modeller.selection(modmodel)
sel = modeller.Selection(modmodel)
sel.energy()
6 changes: 3 additions & 3 deletions modules/modeller/examples/load_modeller_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
IMP.setup_from_argv(sys.argv, "Load Modeller model")

# Set up Modeller and build a model from the GGCC primary sequence
e = modeller.environ()
e = modeller.Environ()
e.edat.dynamic_sphere = True
e.libs.topology.read('${LIB}/top_heav.lib')
e.libs.parameters.read('${LIB}/par.lib')
modmodel = modeller.model(e)
modmodel = modeller.Model(e)
modmodel.build_sequence('GGCC')
# Generate Modeller stereochemistry
sel = modeller.selection(modmodel)
sel = modeller.Selection(modmodel)
modmodel.restraints.make(sel, restraint_type='STEREO', spline_on_site=False)

# Set up IMP and use the ModelLoader class to load the atom coordinates
Expand Down
8 changes: 4 additions & 4 deletions modules/modeller/examples/modeller_restraints_in_imp.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
IMP.setup_from_argv(sys.argv, "Modeller restraints in IMP")

# Set up Modeller and build a model from the GGCC primary sequence
e = modeller.environ()
e = modeller.Environ()
e.edat.dynamic_sphere = False
e.libs.topology.read('${LIB}/top_heav.lib')
e.libs.parameters.read('${LIB}/par.lib')
modmodel = modeller.model(e)
modmodel = modeller.Model(e)
modmodel.build_sequence('GGCC')

# Add a simple Modeller distance restraint between the first and last atoms
feat = modeller.features.distance(modmodel.atoms[0], modmodel.atoms[-1])
r = modeller.forms.gaussian(feature=feat, mean=10.0, stdev=1.0,
feat = modeller.features.Distance(modmodel.atoms[0], modmodel.atoms[-1])
r = modeller.forms.Gaussian(feature=feat, mean=10.0, stdev=1.0,
group=modeller.physical.xy_distance)
modmodel.restraints.add(r)

Expand Down

0 comments on commit 88c82e2

Please sign in to comment.