protected void set(Atom atom1, Atom atom2, Distance distance, int swapFactor) {
   this.atom1 = atom1;
   this.atom2 = atom2;
   this.swapFactor = swapFactor;
   distanceVal = distance.distance();
   dDistanceDx = distance.dDistanceDx();
   dDistanceDy = distance.dDistanceDy();
   dDistanceDz = distance.dDistanceDz();
 }
Exemple #2
0
 /*
  * @parm obj is Distance
  */
 public boolean accept(Object obj) {
   Distance dis = (Distance) obj;
   HB_AtomAttribute atom1Attribute =
       (HB_AtomAttribute) (dis.atom1().getAttribute(HB_AtomAttribute.key));
   HB_AtomAttribute atom2Attribute =
       (HB_AtomAttribute) (dis.atom2().getAttribute(HB_AtomAttribute.key));
   if (atom1Attribute == null
       || atom2Attribute == null) // meens that at list one of the atom is not H or O
     // since we add attribute just to H or O
     return false;
   return ((atom1Attribute.isH && atom2Attribute.isO)
       || (atom1Attribute.isO && atom2Attribute.isH));
 }