Esempio n. 1
0
void Transform::apply_index(Model *m, ParticleIndex pi) const {
  if (!XYZ::get_is_setup(m, pi)) {
    IMP_INTERNAL_CHECK(ignore_non_xyz_,
                       "The particle does not have XYZ attributes");
    return;
  }
  XYZ xyz = XYZ(m, pi);
  xyz.set_coordinates(t_.get_transformed(xyz.get_coordinates()));
}
Esempio n. 2
0
void Transform::apply(Particle *p) const
{
  if (!XYZ::particle_is_instance(p)) {
    IMP_INTERNAL_CHECK(ignore_non_xyz_,
                       "The particle does not have XYZ attributes");
    return;
  }
  XYZ xyz = XYZ(p);
  xyz.set_coordinates(t_.get_transformed(xyz.get_coordinates()));
}
Esempio n. 3
0
void transform(XYZ a, const algebra::Transformation3D &tr) {
  IMP_USAGE_CHECK(!RigidBody::particle_is_instance(a),
                  "Python is calling the wrong function");
  a.set_coordinates(tr.get_transformed(a.get_coordinates()));
}