/** * Translates a chain object, given a Vector3d (i.e. the vecmath library * double-precision 3-d vector) * * @param chain * @param v */ public static final void translate (Chain chain, Vector3d v) { for (Group g:chain.getAtomGroups()) { translate(g, v); } }
/** * Translates a group object, given a Vector3d (i.e. the vecmath library * double-precision 3-d vector) * * @param group * @param v */ public static final void translate (Group group, Vector3d v) { for (Atom atom : group.getAtoms()) { translate(atom,v); } for (Group altG : group.getAltLocs()) { translate(altG, v); } }
/** * Translates a Structure object, given a Vector3d (i.e. the vecmath library * double-precision 3-d vector) * * @param structure * @param v */ public static final void translate (Structure structure, Vector3d v) { for (int n=0; n<structure.nrModels();n++) { for (Chain c : structure.getChains(n)) { translate(c, v); } } }