12use_rigid_bodies =
True
25 prb.set_name(
"rigid body")
30 print(
"initial frame", drb.get_reference_frame())
32 drb.set_coordinates_are_optimized(
True)
38 d.set_coordinates_are_optimized(
True)
46dheader.set_resolution(1)
48dmap.set_particles([p])
66m.set_log_level(IMP.SILENT)
69opt.set_scoring_function(sf)
72def try_point(i, j, k):
73 print(
"trying", i, j, k)
75 to_move.set_coordinates(vc)
82 print(
"score and derivatives", v, to_move.get_derivatives())
86 print(
"after", d.get_coordinates())
87 mag = to_move.get_coordinates().get_magnitude()
92 sg.set_color(converge_color)
93 sg.set_name(
"converge")
97try_point(-bd, -bd, -bd)
Class for storing model, its restraints, constraints, and particles.
Class to handle individual particles of a Model object.
Object used to hold a set of restraints.
static Mass setup_particle(Model *m, ParticleIndex pi, Float mass)
Simple conjugate gradients optimizer.
Create a scoring function on a list of restraints.
static RigidBody setup_particle(Model *m, ParticleIndex pi, ParticleIndexesAdaptor ps)
static XYZR setup_particle(Model *m, ParticleIndex pi)
Write a CGO file with the geometry.
void write_map(DensityMap *m, std::string filename, MapReaderWriter *writer)
Write a density map to a file using the given writer.
Calculate score based on fit to EM map.
Class for sampling a density map from particles.
Output IMP model data in various file formats.
Color get_gray_color(double f)
Return the a grayscale value for f.
Color get_hot_color(double f)
Return the color for f from the hot color map.
Basic utilities for handling cryo-electron microscopy 3D density maps.
DensityHeader create_density_header(const algebra::BoundingBoxD< 3 > &bb, float spacing)
Create a header from a bounding box in 3D.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.