Example #1
0
import IMP
import IMP.restrainer
import IMP.atom
import sys

output = (sys.argv[1])
IMP.set_log_level(IMP.VERBOSE)
# Create restrainer object
restrainer = IMP.restrainer.Main()
# Add representation, restraint, optimization and display to restrainer

rep = restrainer.add_representation('input/repr_cog_Tags_rdm_' + output +
                                    '.xml')
rsr = restrainer.add_restraint('input/restraint_cog_Tags.xml')
opt = restrainer.add_optimization('input/optimization.xml')
disp = restrainer.add_display('input/displ_cog_Tags.xml')

###=======================================================================###
# At this point all data from XML files have been placed into the model.
# Now it is possible to perform various operations on the IMP model.
###=======================================================================###
# Save the initial state in Chimera format
restrainer.log.write(output + '/initial.py')
# Perform optimization
restrainer.optimize()

# Save the optimized state in Chimera format
restrainer.log.write(output + '/optimized.py')
score = restrainer.get_model().evaluate(False)
print "Final score: " + str(score)
Example #2
0
#-- File: nup84_complex_in_bead_representation.py --#
import IMP
import IMP.restrainer
import IMP.atom
IMP.set_log_level(IMP.VERBOSE)
# Create restrainer object
restrainer = IMP.restrainer.Main()
# Add representation, restraint, optimization and display to restrainer

rep = restrainer.add_representation('input/repr_exocyst_rdm.xml')
rsr = restrainer.add_restraint('input/restraint_exocyst.xml')
opt = restrainer.add_optimization('input/optimization.xml')
disp = restrainer.add_display('input/displ_exocyst.xml')

###=======================================================================###
# At this point all data from XML files have been placed into the model.
# Now it is possible to perform various operations on the IMP model.
###=======================================================================###
# Save the initial state in Chimera format
restrainer.log.write('output/initial.py')
# Perform optimization
restrainer.optimize()

# Save the optimized state in Chimera format
restrainer.log.write('output/optimized.py')
score = restrainer.get_model().evaluate(False)
print "Final score: "+str(score)
#-- File: nup84_complex_in_bead_representation.py --#

import IMP
import IMP.restrainer

IMP.base.set_log_level(IMP.base.VERBOSE)

# Create restrainer object
restrainer = IMP.restrainer.Main()

# Add representation, restraint, optimization and display to restrainer
rep = restrainer.add_representation(IMP.restrainer.get_example_path('input/nup84_representation.xml'))
rsr = restrainer.add_restraint(IMP.restrainer.get_example_path('input/nup84_restraint.xml'))
opt = restrainer.add_optimization(IMP.restrainer.get_example_path('input/nup84_optimization.xml'))
disp = restrainer.add_display(IMP.restrainer.get_example_path('input/nup84_display.xml'))

###=======================================================================###
#  At this point all data from XML files have been placed into the model.
#  Now it is possible to perform various operations on the IMP model.
###=======================================================================###

# Save the initial state in Chimera format
restrainer.log.write('initial.py')

# Perform optimization
restrainer.optimize()

# Save the optimized state in Chimera format
restrainer.log.write('optimized.py')
Example #4
0
rmf.set_description("Simulate nup84.\n")

model = restrainer.get_model()
root_hierarchy = rep.get_root_imp_hierarchy()

IMP.rmf.add_hierarchy(rmf, root_hierarchy)
IMP.rmf.add_restraints(rmf, model.get_restraints())
IMP.rmf.save_frame(rmf, 0)

os= IMP.rmf.SaveOptimizerState(rmf)
os.update_always("initial conformation")
restrainer.log = os
#END ADDED PART

opt = restrainer.add_optimization(IMP.restrainer.get_example_path('input/nup84_optimization.xml'))
disp = restrainer.add_display(IMP.restrainer.get_example_path('input/nup84_display.xml'), 'some_log_name')

###=======================================================================###
#  At this point all data from XML files have been placed into the model.
#  Now it is possible to perform various operations on the IMP model.
###=======================================================================###

# Save the initial state in Chimera format
# restrainer.log.write('initial.py')

# Perform optimization
restrainer.optimize()

# Save the optimized state in Chimera format
# restrainer.log.write('optimized.py')