atom.setAtomicNumber(at.getAtomicNumber()); if (at.getExactMass() > 0.0) { atom.setExactMass(at.getExactMass());
atom.setAtomicNumber(at.getAtomicNumber()); if (at.getExactMass() > 0.0) { atom.setExactMass(at.getExactMass());
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; } } }
if (atomType.getExactMass() != CDKConstants.UNSET) atom.setExactMass(atomType.getExactMass());
atom.setExactMass(atomType.getExactMass()); } catch (Exception exception) { logger.warn("Could not configure atom with unknown ID: ", atom, " + (id=", atom.getAtomTypeName(), ")");
atom.setExactMass(atomType.getExactMass()); } catch (Exception exception) { logger.warn("Could not configure atom with unknown ID: ", atom, " + (id=", atom.getAtomTypeName(), ")");
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());