// recalculate the value of this geometry, and return it float GeometryBond::calculate(void) { // get coords to calculate distance float pos1[3], pos2[3]; if(!normal_atom_coord(0, pos1)) return 0.0; if(!normal_atom_coord(1, pos2)) return 0.0; vec_sub(pos2, pos2, pos1); return(geomValue = norm(pos2)); }
// recalculate the value of this geometry, and return it float GeometryDihedral::calculate(void) { // get coords to calculate distance float pos1[3], pos2[3], pos3[3], pos4[3]; if(!normal_atom_coord(0, pos1)) return 0.0; if(!normal_atom_coord(1, pos2)) return 0.0; if(!normal_atom_coord(2, pos3)) return 0.0; if(!normal_atom_coord(3, pos4)) return 0.0; return (geomValue = dihedral(pos1, pos2, pos3, pos4)); }