atomType.setExactMass(mass); atomType.setCovalentRadius(covalent);
atomType.setExactMass(mass); atomType.setCovalentRadius(covalent);
atomType.setExactMass(mass); atomType.setMassNumber(massNumber(atomNr, mass)); atomType.setFormalNeighbourCount(maxbond);
atomType.setExactMass(mass); atomType.setMassNumber(massNumber(atomNr, mass)); atomType.setFormalNeighbourCount(maxbond);
atomType.setExactMass(mass); atomType.setMassNumber(massNumber(an, mass)); atomType.setFormalNeighbourCount(maxbond);
atomType.setExactMass(mass); atomType.setMassNumber(massNumber(an, mass)); atomType.setFormalNeighbourCount(maxbond);
@Test public void testConfigureUnsetProperties() { IAtom atom = new Atom(Elements.CARBON); IAtomType atomType = new AtomType(Elements.CARBON); atomType.setExactMass(12.0); AtomTypeManipulator.configureUnsetProperties(atom, atomType); Assert.assertEquals(12.0, atom.getExactMass(), 0.1); }
@Test public void testConfigureUnsetProperties_DontOverwriterSetProperties() { IAtom atom = new Atom(Elements.CARBON); atom.setExactMass(13.0); IAtomType atomType = new AtomType(Elements.CARBON); atomType.setExactMass(12.0); AtomTypeManipulator.configureUnsetProperties(atom, atomType); Assert.assertEquals(13.0, atom.getExactMass(), 0.1); }
@Test public void testPerceiveAtomTypesAndConfigureUnsetProperties() throws Exception { IAtomContainer container = new AtomContainer(); IAtom atom = new Atom("C"); atom.setExactMass(13.0); container.addAtom(atom); IAtomType type = new AtomType("C"); type.setAtomTypeName("C.sp3"); type.setExactMass(12.0); AtomContainerManipulator.percieveAtomTypesAndConfigureUnsetProperties(container); Assert.assertNotNull(atom.getExactMass()); Assert.assertEquals(13.0, atom.getExactMass(), 0.1); Assert.assertNotNull(atom.getAtomTypeName()); Assert.assertEquals("C.sp3", atom.getAtomTypeName()); }