private void endAtomTypeElement(String local) { if ("AtomType".equals(local)) { atomTypes.add(currentAtomType); currentAtomType.setProperty(CDKConstants.PI_BOND_COUNT, piBondCount); currentAtomType.setFormalNeighbourCount(neighborCount); if (maxBondOrder != Order.UNSET) currentAtomType.setMaxBondOrder(maxBondOrder); if (bondOrderSum > 0.1) currentAtomType.setBondOrderSum(bondOrderSum); } else if ("formalCharge".equals(local)) { if (currentChars.charAt(0) == '+') { currentChars = currentChars.substring(1); } currentAtomType.setFormalCharge(Integer.parseInt(currentChars)); } else if ("formalNeighbourCount".equals(local)) { neighborCount = Integer.parseInt(currentChars); } else if ("lonePairCount".equals(local)) { currentAtomType.setProperty(CDKConstants.LONE_PAIR_COUNT, Integer.parseInt(currentChars)); } else if ("singleElectronCount".equals(local)) { currentAtomType.setProperty(CDKConstants.SINGLE_ELECTRON_COUNT, Integer.parseInt(currentChars)); } else if ("piBondCount".equals(local)) { piBondCount = Integer.parseInt(currentChars); } }
private void endAtomTypeElement(String local) { if ("AtomType".equals(local)) { atomTypes.add(currentAtomType); currentAtomType.setProperty(CDKConstants.PI_BOND_COUNT, piBondCount); currentAtomType.setFormalNeighbourCount(neighborCount); if (maxBondOrder != Order.UNSET) currentAtomType.setMaxBondOrder(maxBondOrder); if (bondOrderSum > 0.1) currentAtomType.setBondOrderSum(bondOrderSum); } else if ("formalCharge".equals(local)) { if (currentChars.charAt(0) == '+') { currentChars = currentChars.substring(1); } currentAtomType.setFormalCharge(Integer.parseInt(currentChars)); } else if ("formalNeighbourCount".equals(local)) { neighborCount = Integer.parseInt(currentChars); } else if ("lonePairCount".equals(local)) { currentAtomType.setProperty(CDKConstants.LONE_PAIR_COUNT, Integer.parseInt(currentChars)); } else if ("singleElectronCount".equals(local)) { currentAtomType.setProperty(CDKConstants.SINGLE_ELECTRON_COUNT, Integer.parseInt(currentChars)); } else if ("piBondCount".equals(local)) { piBondCount = Integer.parseInt(currentChars); } }
atomType.setExactMass(mass); atomType.setMassNumber(massNumber(atomNr, mass)); atomType.setFormalNeighbourCount(maxbond); atomType.setSymbol(rootType); Color co = new Color(rl, gl, bl);
atomType.setExactMass(mass); atomType.setMassNumber(massNumber(an, mass)); atomType.setFormalNeighbourCount(maxbond); atomType.setSymbol(rootType); Color co = new Color(rl, gl, bl);
atomType.setExactMass(mass); atomType.setMassNumber(massNumber(an, mass)); atomType.setFormalNeighbourCount(maxbond); atomType.setSymbol(rootType); Color co = new Color(rl, gl, bl);
atomType.setExactMass(mass); atomType.setMassNumber(massNumber(atomNr, mass)); atomType.setFormalNeighbourCount(maxbond); atomType.setSymbol(rootType); Color co = new Color(rl, gl, bl);
/** * Method to test the clone() method */ @Test public void testClone_FormalNeighbourCount() throws Exception { IAtomType at = (IAtomType) newChemObject(); at.setFormalNeighbourCount(1); IAtomType clone = (IAtomType) at.clone(); at.setFormalNeighbourCount(2); Assert.assertEquals(1, (int) clone.getFormalNeighbourCount()); }
atomType.setFormalNeighbourCount(Integer.parseInt(currentChars)); } else if (scalarType == SCALAR_VALENCY) { atomType.setValency(Integer.parseInt(currentChars));
atomType.setFormalNeighbourCount(Integer.parseInt(currentChars)); } else if (scalarType == SCALAR_VALENCY) { atomType.setValency(Integer.parseInt(currentChars));
@Test public void testSetFormalNeighbourCount_Integer() { int count = 4; IAtomType a = (IAtomType) newChemObject(); a.setFormalNeighbourCount(count); Assert.assertEquals(count, (int) a.getFormalNeighbourCount()); }