atom.setProperty("org.openscience.cdk.renderer.color", color); if (at.getAtomicNumber() != 0) { atom.setAtomicNumber(at.getAtomicNumber());
atom.setProperty("org.openscience.cdk.renderer.color", color); if (at.getAtomicNumber() != 0) { atom.setAtomicNumber(at.getAtomicNumber());
assertEquals(Integer.parseInt(smaxbond), (int) atomtype.getFormalNeighbourCount()); String satomNr = "6"; assertEquals(Integer.parseInt(satomNr), (int) atomtype.getAtomicNumber());
ImmutableAtomType(IAtomType type) { this.element = type.getSymbol(); this.atomicNumber = type.getAtomicNumber(); this.naturalAbundance = type.getNaturalAbundance(); this.exactMass = type.getExactMass(); this.massNumber = type.getMassNumber(); this.formalCharge = type.getFormalCharge(); this.hybridization = type.getHybridization(); this.formalNeighbourCount = type.getFormalNeighbourCount(); this.identifier = type.getAtomTypeName(); this.maxBondOrder = type.getMaxBondOrder(); this.bondOrderSum = type.getBondOrderSum(); this.covalentRadius = type.getCovalentRadius(); this.flags = (short)type.getFlagValue(); this.properties = Collections.unmodifiableMap(type.getProperties()); if (type.getValency() != null) { this.electronValency = type.getValency(); } else { Integer piBondCount = type.getProperty(CDKConstants.PI_BOND_COUNT, Integer.class); if (piBondCount != null && formalNeighbourCount != null) { this.electronValency = piBondCount + formalNeighbourCount; } else { this.electronValency = null; } } }
ImmutableAtomType(IAtomType type) { this.element = type.getSymbol(); this.atomicNumber = type.getAtomicNumber(); this.naturalAbundance = type.getNaturalAbundance(); this.exactMass = type.getExactMass(); this.massNumber = type.getMassNumber(); this.formalCharge = type.getFormalCharge(); this.hybridization = type.getHybridization(); this.formalNeighbourCount = type.getFormalNeighbourCount(); this.identifier = type.getAtomTypeName(); this.maxBondOrder = type.getMaxBondOrder(); this.bondOrderSum = type.getBondOrderSum(); this.covalentRadius = type.getCovalentRadius(); this.flags = (short)type.getFlagValue(); this.properties = Collections.unmodifiableMap(type.getProperties()); if (type.getValency() != null) { this.electronValency = type.getValency(); } else { Integer piBondCount = type.getProperty(CDKConstants.PI_BOND_COUNT, Integer.class); if (piBondCount != null && formalNeighbourCount != null) { this.electronValency = piBondCount + formalNeighbourCount; } else { this.electronValency = null; } } }
@Test public void testSetMM2Parameters() throws CDKException { forceFieldConfigurator.setMM2Parameters(DefaultChemObjectBuilder.getInstance()); assertNotNull(forceFieldConfigurator.getParameterSet()); List<IAtomType> atomtypeList = forceFieldConfigurator.getAtomTypes(); IAtomType atomtype1 = atomtypeList.get(1); assertEquals("Csp2", atomtype1.getAtomTypeName()); assertEquals(6, (int) atomtype1.getAtomicNumber()); assertEquals(12, (int) atomtype1.getMassNumber()); }
@Test public void testSetMMFF94Parameters() throws Exception { forceFieldConfigurator.setMMFF94Parameters(DefaultChemObjectBuilder.getInstance()); assertNotNull(forceFieldConfigurator.getParameterSet()); List<IAtomType> atomtypeList = forceFieldConfigurator.getAtomTypes(); IAtomType atomtype4 = atomtypeList.get(4); assertEquals("CO2M", atomtype4.getAtomTypeName()); assertEquals(6, (int) atomtype4.getAtomicNumber()); assertEquals(3, (int) atomtype4.getFormalNeighbourCount()); assertEquals(12, (int) atomtype4.getMassNumber()); }
atom.setProperty("org.openscience.cdk.renderer.color", color); if (atomType.getAtomicNumber() != CDKConstants.UNSET) atom.setAtomicNumber(atomType.getAtomicNumber()); if (atomType.getExactMass() != CDKConstants.UNSET) atom.setExactMass(atomType.getExactMass());
atom.setProperty("org.openscience.cdk.renderer.color", color); atom.setAtomicNumber(atomType.getAtomicNumber()); atom.setExactMass(atomType.getExactMass()); } catch (Exception exception) {
atom.setProperty("org.openscience.cdk.renderer.color", color); atom.setAtomicNumber(atomType.getAtomicNumber()); atom.setExactMass(atomType.getExactMass()); } catch (Exception exception) {
&& atomType.getFormalNeighbourCount() != CDKConstants.UNSET) atom.setFormalNeighbourCount(atomType.getFormalNeighbourCount()); if (atom.getAtomicNumber() == CDKConstants.UNSET && atomType.getAtomicNumber() != CDKConstants.UNSET) atom.setAtomicNumber(atomType.getAtomicNumber()); if (atom.getExactMass() == CDKConstants.UNSET && atomType.getExactMass() != CDKConstants.UNSET) atom.setExactMass(atomType.getExactMass());