@Override public boolean[] getFlags() { // could use a list a invoke .toArray() on the return boolean[] flagArray = new boolean[CDKConstants.MAX_FLAG_INDEX + 1]; for (int i = 0; i < CDKConstants.FLAG_MASKS.length; i++) { int mask = CDKConstants.FLAG_MASKS[i]; flagArray[i] = getFlag(mask); } return flagArray; }
StringBuffer resultString = new StringBuffer(64); resultString.append("ImmutableAtomType(").append(hashCode()); if (getAtomTypeName() != null) { resultString.append(", N:").append(getAtomTypeName()); if (getMaxBondOrder() != null) { resultString.append(", MBO:").append(getMaxBondOrder()); if (getBondOrderSum() != null) { resultString.append(", BOS:").append(getBondOrderSum()); if (getFormalCharge() != null) { resultString.append(", FC:").append(getFormalCharge()); if (getHybridization() != null) { resultString.append(", H:").append(getHybridization()); if (getFormalNeighbourCount() != null) { resultString.append(", NC:").append(getFormalNeighbourCount()); if (getCovalentRadius() != null) { resultString.append(", CR:").append(getCovalentRadius()); if (getValency() != null) { resultString.append(", EV:").append(getValency());
private void readConfiguration(InputStream ins, String format, IChemObjectBuilder builder) { IAtomTypeConfigurator atc = constructConfigurator(format); if (atc != null) { atc.setInputStream(ins); try { List<IAtomType> readAtomTypes = atc.readAtomTypes(builder); for (IAtomType type : readAtomTypes) { atomTypes.put(type.getAtomTypeName(), new ImmutableAtomType(type)); } } catch (Exception exc) { logger.error("Could not read AtomType's from file due to: ", exc.getMessage()); logger.debug(exc); } } else { logger.debug("AtomTypeConfigurator was null!"); atomTypes = new HashMap<String,IAtomType>(); } }
StringBuffer resultString = new StringBuffer(64); resultString.append("ImmutableAtomType(").append(hashCode()); if (getAtomTypeName() != null) { resultString.append(", N:").append(getAtomTypeName()); if (getMaxBondOrder() != null) { resultString.append(", MBO:").append(getMaxBondOrder()); if (getBondOrderSum() != null) { resultString.append(", BOS:").append(getBondOrderSum()); if (getFormalCharge() != null) { resultString.append(", FC:").append(getFormalCharge()); if (getHybridization() != null) { resultString.append(", H:").append(getHybridization()); if (getFormalNeighbourCount() != null) { resultString.append(", NC:").append(getFormalNeighbourCount()); if (getCovalentRadius() != null) { resultString.append(", CR:").append(getCovalentRadius()); if (getValency() != null) { resultString.append(", EV:").append(getValency());
private void readConfiguration(InputStream ins, String format, IChemObjectBuilder builder) { IAtomTypeConfigurator atc = constructConfigurator(format); if (atc != null) { atc.setInputStream(ins); try { List<IAtomType> readAtomTypes = atc.readAtomTypes(builder); for (IAtomType type : readAtomTypes) { atomTypes.put(type.getAtomTypeName(), new ImmutableAtomType(type)); } } catch (Exception exc) { logger.error("Could not read AtomType's from file due to: ", exc.getMessage()); logger.debug(exc); } } else { logger.debug("AtomTypeConfigurator was null!"); atomTypes = new HashMap<String,IAtomType>(); } }
@Override public boolean[] getFlags() { // could use a list a invoke .toArray() on the return boolean[] flagArray = new boolean[CDKConstants.MAX_FLAG_INDEX + 1]; for (int i = 0; i < CDKConstants.FLAG_MASKS.length; i++) { int mask = CDKConstants.FLAG_MASKS[i]; flagArray[i] = getFlag(mask); } return flagArray; }