8 #ifndef IMPPMI_UTILITIES_H
9 #define IMPPMI_UTILITIES_H
11 #include <IMP/pmi/pmi_config.h>
15 #include <IMP/base/Vector.h>
17 IMPPMI_BEGIN_NAMESPACE
25 for (
int n1=0;n1<nps;n1++){
26 for (
int n2=n1+1;n2<nps;n2++){
29 if (dist<dist_cutoff){
34 rs->add_restraint(rx);
44 double mindist = -1.0 ;
46 for (
unsigned int k1 = 0; k1 < m1.size(); ++k1) {
47 for (
unsigned int k2 = 0; k2 < m2.size(); ++k2) {
49 if (mindist < 0.0){mindist=dist;}
50 if (mindist > dist){mindist=dist;}
53 if (mindist < 0 ){mindist = 0;}
58 inline Floats get_list_of_bipartite_minimum_sphere_distance(
const ParticlesTemps & pss) {
60 for (
unsigned int k1 = 0; k1 < pss.size()-1; ++k1) {
61 for (
unsigned int k2 = k1+1; k2 < pss.size(); ++k2) {
64 double dist = IMP::pmi::get_bipartite_minimum_sphere_distance(xyzrs1,xyzrs2);
65 mindistances.push_back(dist);
Restraint * create_restraint(Score *s, const typename Score::Argument &t, std::string name=std::string())
Distance restraint between two particles.
IMP::Vector< Float > Floats
Standard way to pass a bunch of Float values.
A smart pointer to a reference counted object.
Object used to hold a set of restraints.
#define IMP_NEW(Typename, varname, args)
Declare a ref counted pointer to a new object.
double get_distance(const Plane3D &pln, const Vector3D &p)
Return the distance between a plane and a point in 3D.
RestraintSet * create_elastic_network(const Particles &ps, Float dist_cutoff, Float strength)
Create an elastic network restraint set.
double get_distance(XYZ a, XYZ b)
Compute the distance between a pair of particles.
A decorator for a particle with x,y,z coordinates.
A Score on the distance between a pair of particles.
Array< 2, WeakPointer< Particle >, Particle * > ParticlePair
double Float
Basic floating-point value (could be float, double...)
Decorator for a sphere-like particle.