IMP
2.0.0
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
IMP
IMP Documentation
Application Index
Argument Index
Class Examples
Modeling of GroEL with cnmultifit
Modeling of 3sfd with EMageFit
EMageFit protocol
EMageFit scripts and tools
Factory Index
Determination of a Nup133 structure with FoXS
Function Examples
Example design discussion
Developer Guide
Change History
Installation
Introduction
Mailing lists
Multithreaded evaluation using OpenMP
Integrative docking utility programs
Docking of PCSK9 with idock
Dependencies between objects
Module Index
Modeling of 3sfd with multifit
Deprecated List
Modules
Namespaces
Classes
Files
Examples
algebra/geometry.py
algebra/grid_space.py
atom/assess_dope.py
atom/brownian_statistics.py
atom/cg_pdb.py
atom/charmm_forcefield.py
atom/charmm_forcefield_verbose.py
atom/dope_and_excluded_volume.cpp
atom/load_protein_restrain_bonds.py
atom/markers.py
atom/molecular_hierarchy.py
atom/rigid_brownian_dynamics.py
atom/score_protein_with_ligand.py
atom/structure_from_sequence.py
base/log.py
container/bipartite_nonbonded_interactions.py
container/connectivity.py
container/filter_close_pairs.py
container/nonbonded_interactions.py
container/restrain_in_sphere.py
core/connectivity_restraint.py
core/cover_particles.py
core/custom_hierarchy.py
core/excluded_volume.py
core/incremental_mc.py
core/ms_connectivity_restraint.py
core/optimize_balls.py
core/pair_restraint.py
core/randomize_rigid_body.py
core/restrain_diameter.py
core/restrain_minimum_distance.py
core/rigid_bodies.py
core/rigid_collisions.py
core/symmetry.py
core/XYZ_Decorator.py
core/XYZR_Decorator.py
display/basic_geometry.py
display/display_log.py
display/displaying_ensembles.py
display/show_particles_as_spheres.py
domino/custom_filter.py
domino/domino_approach.py
domino/interactive.py
domino/interactive_with_containers.py
domino/marina_party.py
domino/merge_tree.py
domino/multiscale.py
domino/restraint_cache.py
domino/rigid_body_excluded_volume.py
domino/save_assignments.py
domino/six_particles_optimization.py
em/analyze_convergence.py
em/cube.py
em/fit_restraint.py
em/generate_density_map_of_fixed_dimension.py
em/local_fitting.py
em/pdb2density.py
em2d/clustering_of_pdb_models.py
em2d/collision_cross_section.py
em2d/em_images_conversion.py
em2d/optimize_em2d_with_montecarlo.py
example/range_restriction.py
gsl/simplex.py
kernel/basic_optimization.py
kernel/chain.py
kernel/dependency_graph.py
kernel/dock_with_crosslinks.py
kernel/graph.py
kernel/nup84.py
kernel/setup.py
kernel/write_a_restraint.py
kernel/write_an_optimizer_state.py
kmeans/kmeans_example.py
misc/decay.py
modeller/imp_restraints_in_modeller.py
modeller/load_modeller_model.py
modeller/modeller_restraints_in_imp.py
modules/rotamer/examples/rotamer_pdb.py
parallel/local_distance.py
parallel/tasks.py
restrainer/basic_display.py
restrainer/basic_setup.py
restrainer/em_restraint.py
restrainer/nup84_complex_in_bead_representation.py
restrainer/rigid_body_and_excluded_volume_restraint.py
restrainer/saxs_restraint.py
restrainer/simple_connectivity_on_molecules.py
restrainer/simple_connectivity_on_rigid_bodies.py
restrainer/simple_diameter.py
restrainer/simple_distance.py
restrainer/simple_em_fit.py
restrainer/simple_excluded_volume.py
rmf/geometry.py
rmf/link.py
rmf/multiresolution.py
rmf/pdb.py
rmf/simulation.py
rotamer/rotamer_pdb.py
saxs/profile.py
saxs/profile_fit.py
statistics/kmeans.py
statistics/write_a_metric.py
core/symmetry.py
Show how to use the code in core to enforce symmetry.
1
## \example core/symmetry.py
2
## Show how to use the code in core to enforce symmetry.
3
4
import
IMP.core
5
import
IMP.container
6
7
m=
IMP.Model
()
8
m.set_log_level(IMP.base.SILENT)
9
ps =[]
10
# create 4 xyz particles
11
for
i
in
range(0,4):
12
p =
IMP.Particle
(m)
13
ps.append(p)
14
d=
IMP.core.XYZ.setup_particle
(p,
IMP.algebra.Vector3D
(.5,0,0))
15
IMP.core.XYZR.setup_particle
(p, 1)
16
17
# set the 0 particle as the reference particle for the others as
18
# they will get their positions from it
19
for
i,p
in
enumerate(ps[1:]):
20
# the other 3 particles are all symmetric copies of the first
21
IMP.core.Reference.setup_particle
(p, ps[0])
22
# the symmetry operation is rotation around the z axis
23
tr=
IMP.algebra.Transformation3D
(
IMP.algebra.get_rotation_about_axis
(IMP.algebra.get_basis_vector_3d(2),
24
3.14/2.0*(i+1)),
25
IMP.algebra.Vector3D
(0,0,0))
26
sm=
IMP.core.TransformationSymmetry
(tr)
27
# set up a constraint for the one particle, if you have more than one with the same symmetry
28
# transform, you should use an IMP.container.SingletonsConstraint.
29
c=
IMP.core.SingletonConstraint
(sm,
None
, p)
30
m.add_score_state(c)
31
r=
IMP.core.ExcludedVolumeRestraint
(
IMP.container.ListSingletonContainer
(ps),
32
1)
33
m.add_restraint(r)
34
35
d0=
IMP.core.XYZ
(ps[0])
36
# print only optimize the main particle
37
d0.set_coordinates_are_optimized(
True
)
38
39
opt=
IMP.core.ConjugateGradients
(m)
40
opt.optimize(10)
41
print
"score is "
, m.evaluate(
False
)
42
for
p
in
ps:
43
print
p.get_name(),
IMP.core.XYZ
(p).get_coordinates()