public void bondAtoms(Atom atom1, Atom atom2, short order, BitArray bsA, BitArray bsB) { bool atom1InSetA = bsA == null || bsA.Get(atom1.atomIndex); bool atom1InSetB = bsB == null || bsB.Get(atom1.atomIndex); bool atom2InSetA = bsA == null || bsA.Get(atom2.atomIndex); bool atom2InSetB = bsB == null || bsB.Get(atom2.atomIndex); if (atom1InSetA & atom2InSetB || atom1InSetB & atom2InSetA) { addBond(atom1.bondMutually(atom2, order, this)); } }
public void bondAtoms(Atom atom1, Atom atom2, int order) { // skip ht lookup - pointless if (bondCount == bonds.Length) { bonds = (Bond[])Util.setLength(bonds, bondCount + 2 * ATOM_GROWTH_INCREMENT); } // note that if the atoms are already bonded then // Atom.bondMutually(...) will return null Bond bond = atom1.bondMutually(atom2, (short)order, this); if (bond != null) { bonds[bondCount++] = bond; if ((order & JmolConstants.BOND_HYDROGEN_MASK) != 0) { fileHasHbonds = true; } } }
public void checkValencesAndBond(Atom atomA, Atom atomB, short order) { // System.out.println("checkValencesAndBond(" + // atomA.point3f + "," + atomB.point3f + ")"); if (atomA.CurrentBondCount > JmolConstants.MAXIMUM_AUTO_BOND_COUNT || atomB.CurrentBondCount > JmolConstants.MAXIMUM_AUTO_BOND_COUNT) { System.Console.Out.WriteLine("maximum auto bond count reached"); return; } int formalChargeA = atomA.FormalCharge; if (formalChargeA != 0) { int formalChargeB = atomB.FormalCharge; if ((formalChargeA < 0 && formalChargeB < 0) || (formalChargeA > 0 && formalChargeB > 0)) { return; } } addBond(atomA.bondMutually(atomB, order, this)); }
public void bondAtoms(Atom atom1, Atom atom2, short order, BitArray bsA, BitArray bsB) { bool atom1InSetA = bsA == null || bsA.Get(atom1.atomIndex); bool atom1InSetB = bsB == null || bsB.Get(atom1.atomIndex); bool atom2InSetA = bsA == null || bsA.Get(atom2.atomIndex); bool atom2InSetB = bsB == null || bsB.Get(atom2.atomIndex); if (atom1InSetA & atom2InSetB || atom1InSetB & atom2InSetA) addBond(atom1.bondMutually(atom2, order, this)); }
public void bondAtoms(Atom atom1, Atom atom2, int order) { // skip ht lookup - pointless if (bondCount == bonds.Length) bonds = (Bond[])Util.setLength(bonds, bondCount + 2 * ATOM_GROWTH_INCREMENT); // note that if the atoms are already bonded then // Atom.bondMutually(...) will return null Bond bond = atom1.bondMutually(atom2, (short)order, this); if (bond != null) { bonds[bondCount++] = bond; if ((order & JmolConstants.BOND_HYDROGEN_MASK) != 0) fileHasHbonds = true; } }
public void checkValencesAndBond(Atom atomA, Atom atomB, short order) { // System.out.println("checkValencesAndBond(" + // atomA.point3f + "," + atomB.point3f + ")"); if (atomA.CurrentBondCount > JmolConstants.MAXIMUM_AUTO_BOND_COUNT || atomB.CurrentBondCount > JmolConstants.MAXIMUM_AUTO_BOND_COUNT) { System.Console.Out.WriteLine("maximum auto bond count reached"); return; } int formalChargeA = atomA.FormalCharge; if (formalChargeA != 0) { int formalChargeB = atomB.FormalCharge; if ((formalChargeA < 0 && formalChargeB < 0) || (formalChargeA > 0 && formalChargeB > 0)) return; } addBond(atomA.bondMutually(atomB, order, this)); }
public void bondAtoms(Atom atom1, Atom atom2, short order) { addBond(atom1.bondMutually(atom2, order, this)); }