This example shows how to use IMP::em::FitRestraint.
<!-- File: em_representation.xml -->
<Representation>
<Protein id="Protein1">
<Chain>
<Fragment id="frag1">
<GeometricShapeRep>
<Sphere radius="1.0" weight="1.0">
<InitialPosition optimize="1" x="12.0" y="12.0" z="12.0"/>
</Sphere>
</GeometricShapeRep>
</Fragment>
<Fragment id="frag2">
<GeometricShapeRep>
<Sphere radius="1.0" weight="1.0">
<InitialPosition optimize="1" x="15.0" y="6.0" z="6.0"/>
</Sphere>
</GeometricShapeRep>
</Fragment>
<Fragment id="frag3">
<GeometricShapeRep>
<Sphere radius="1.0" weight="1.0">
<InitialPosition optimize="1" x="6.0" y="15.0" z="15.0"/>
</Sphere>
</GeometricShapeRep>
</Fragment>
</Chain>
</Protein>
</Representation>
<!-- File: em_restraint.xml -->
<EM>
<
Restraint name=
"em_restraint" density_filename=
"data/in.mrc" spacing=
"1.0" resolution=
"3.0" xorigin=
"-6.0" yorigin=
"-6.0" zorigin=
"-6.0">
</EM>
14 restrainer = IMP.restrainer.Main()
17 rep = restrainer.add_representation(
19 rsr = restrainer.add_restraint(
28 model = restrainer.get_model()
31 r = rsr.get_restraint_by_name(
'em_restraint')
34 dmap_header = r.dmap_header
37 fit_restraint = r.imp_restraint
38 fit_restraint.evaluate(
False)