37 dmap.get_header_writable().set_resolution(resolution)
46 sampled_input_density.set_particles(ps)
47 sampled_input_density.resample()
48 sampled_input_density.calcRMS()
52 dmap, sampled_input_density, sampled_input_density.get_header().dmin)
53 print "The CC score of the native transformation is:", best_score
60 IMP.algebra.get_unit_bounding_box_3d())
62 rand_angle = random.uniform(-70. / 180 * math.pi, 70. / 180 * math.pi)
78 sampled_input_density.resample()
79 sampled_input_density.calcRMS()
82 dmap, sampled_input_density, sampled_input_density.get_header().dmin)
84 print "The start score is:", start_score,
"with rmsd of:", start_rmsd
87 print "preforming local refinement, may run for 3-4 minutes"
92 sampled_input_density.resample()
93 sampled_input_density.calcRMS()
96 dmap, sampled_input_density, sampled_input_density.get_header().dmin)
97 print "The score after centering is:", score2,
"with rmsd of:", rmsd
105 mh.get_particle(), refiner,
111 print "The start score is:", start_score,
"with rmsd of:", start_rmsd
112 for i
in range(fitting_sols.get_number_of_solutions()):
120 print "Fit with index:", i,
" with cc: ", 1. - fitting_sols.get_score(i),
" and rmsd to native of:", rmsd
123 prot_rb, fitting_sols.get_transformation(i).get_inverse())
void write_pdb(const Selection &mhd, base::TextOutput out, unsigned int model=1)
static FloatKey get_mass_key()
Return the hierarchy leaves under a particle.
void set_log_level(LogLevel l)
Set the current global log level.
void add_radii(Hierarchy d, const ForceFieldParameters *ffp=get_all_atom_CHARMM_parameters(), FloatKey radius_key=FloatKey("radius"))
void set_check_level(CheckLevel tf)
Control runtime checks in the code.
A decorator for a particle that is part of a rigid body.
algebra::Vector3D get_centroid(const XYZs &ps)
Get the centroid.
GenericHierarchies get_leaves(Hierarchy mhd)
Get all the leaves of the bit of hierarchy.
Vector3D get_random_vector_in(const Cylinder3D &c)
Generate a random vector in a cylinder with uniform density.
void write_map(DensityMap *m, std::string filename)
Rotation3D get_rotation_about_axis(const Vector3D &axis, double angle)
Generate a Rotation3D object from a rotation around an axis.
Class for sampling a density map from particles.
double get_rmsd(const Selection &s0, const Selection &s1, const IMP::algebra::Transformation3D &tr_for_second=IMP::algebra::get_identity_transformation_3d())
static double cross_correlation_coefficient(const DensityMap *grid1, const DensityMap *grid2, float grid2_voxel_data_threshold, bool allow_padding=false, FloatPair norm_factors=FloatPair(0., 0.))
Calculates the cross correlation coefficient between two maps.
void transform(XYZ a, const algebra::Transformation3D &tr)
Apply a transformation to the particle.
See IMP.em for more information.
DensityMap * read_map(std::string filename)
static const IMP::core::HierarchyTraits & get_traits()
Get the molecular hierarchy HierararchyTraits.
std::string get_example_path(std::string file_name)
Return the path to installed example data for this module.
See IMP.core for more information.
IMP::core::RigidBody create_rigid_body(Hierarchy h)
Rotation3D get_identity_rotation_3d()
Return a rotation that does not do anything.
VectorD< D > get_random_vector_on(const SphereD< D > &s)
Generate a random vector on a sphere with uniform density.
Select all CA ATOM records.
See IMP.atom for more information.
void read_pdb(base::TextInput input, int model, Hierarchy h)
FittingSolutions local_rigid_fitting(kernel::Particle *p, Refiner *refiner, const FloatKey &weight_key, DensityMap *dmap, OptimizerStates display_log, Int number_of_optimization_runs=5, Int number_of_mc_steps=10, Int number_of_cg_steps=100, Float max_translation=2., Float max_rotation=.3, bool fast=true)
Local rigid fitting of a rigid body.
Class for storing model, its restraints, constraints, and particles.