IMP  2.0.0
The Integrative Modeling Platform
restrainer/nup84_complex_in_bead_representation.py

This example shows basic modeling of Nup84 complex using bead representation. On the following figures, we see XML input files for the representation, restraint, optimization and display. See Nup84 coarse grained example in the kernel for a non-restrainer version of this example.

The XML representation input file determines how the system is represented using a 'bead model'. Each protein is represented as a sphere, or a pair of spheres (in the case of the rodlike Nup133 and Nup120 proteins), with larger proteins using larger spheres.

The XML restraint input file encodes the input structural data as spatial restraints on the system. Here, we use two simple sources of information. First, excluded volume for each protein. Second, yeast two-hybrid results for some pairs of proteins.

The XML optimization input file sets up a simple conjugate gradients optimization.

The XML display input file is for visualization only, and assigns each sphere a different color.

The following Python script loads in all four of the XML files and performs the optimization. Restrainer first generates a set of sphere-like particles to represent the system. It then converts the information in the restraints file into a set of IMP restraints. It generates an excluded volume restraint that prevents each protein sphere from penetrating any other sphere and a set of 'connectivity' restraints that force the protein particles to reproduce the interactions implied by the yeast two-hybrid experiments. The optimization generates a file optimized.py that is an input file for the molecular visualization program Chimera; when loaded into Chimera, it displays the final optimized configuration of the complex.

1 ## \example restrainer/nup84_complex_in_bead_representation.py
2 ## This example shows basic modeling of Nup84 complex using bead representation. On the following figures, we see XML input files for the representation, restraint, optimization and display. See \ref modules/kernel/nup84_cg.py "Nup84 coarse grained" example in the kernel for a non-restrainer version of this example.
3 ##
4 ## \include nup84_representation.xml
5 ##
6 ## The XML representation input file determines how the system is represented using a 'bead model'. Each protein is represented as a sphere, or a pair of spheres (in the case of the rodlike Nup133 and Nup120 proteins), with larger proteins using larger spheres.
7 ##
8 ## \include nup84_restraint.xml
9 ##
10 ## The XML restraint input file encodes the input structural data as spatial restraints on the system. Here, we use two simple sources of information. First, excluded volume for each protein. Second, yeast two-hybrid results for some pairs of proteins.
11 ##
12 ## \include nup84_optimization.xml
13 ##
14 ## The XML optimization input file sets up a simple conjugate gradients optimization.
15 ##
16 ## \include nup84_display.xml
17 ##
18 ## The XML display input file is for visualization only, and assigns each sphere a different color.
19 ##
20 ##
21 ## The following Python script loads in all four of the XML files and performs the optimization. Restrainer first generates a set of sphere-like particles to represent the system. It then converts the information in the restraints file into a set of IMP restraints. It generates an excluded volume restraint that prevents each protein sphere from penetrating any other sphere and a set of 'connectivity' restraints that force the protein particles to reproduce the interactions implied by the yeast two-hybrid experiments. The optimization generates a file optimized.py that is an input file for the molecular visualization program Chimera; when loaded into Chimera, it displays the final optimized configuration of the complex.
22 ##
23 
24 #-- File: nup84_complex_in_bead_representation.py --#
25 
26 import IMP
27 import IMP.restrainer
28 
29 IMP.base.set_log_level(IMP.base.VERBOSE)
30 
31 # Create restrainer object
32 restrainer = IMP.restrainer.Main()
33 
34 # Add representation, restraint, optimization and display to restrainer
35 rep = restrainer.add_representation(IMP.restrainer.get_example_path('input/nup84_representation.xml'))
36 rsr = restrainer.add_restraint(IMP.restrainer.get_example_path('input/nup84_restraint.xml'))
37 opt = restrainer.add_optimization(IMP.restrainer.get_example_path('input/nup84_optimization.xml'))
38 disp = restrainer.add_display(IMP.restrainer.get_example_path('input/nup84_display.xml'))
39 
40 ###=======================================================================###
41 # At this point all data from XML files have been placed into the model.
42 # Now it is possible to perform various operations on the IMP model.
43 ###=======================================================================###
44 
45 # Save the initial state in Chimera format
46 restrainer.log.write('initial.py')
47 
48 # Perform optimization
49 restrainer.optimize()
50 
51 # Save the optimized state in Chimera format
52 restrainer.log.write('optimized.py')