/** * copy node . * * @return Node */ public Node copy() { return new CMLAtom(this); }
atom = new CMLAtom(); } else if (parent instanceof CMLAtomArray) { error = "Atom needs non-null grandparent"; } else if (grandParent instanceof CMLMolecule) { atom = new CMLAtom(); } else if (grandParent instanceof CMLFormula) { error = "Atom grandparent must be not be formula"; atom = new CMLAtom();
/** An array of atom IDs. * * Normally an attribute of an array-based element. * --type info-- * * An array of atomRefs. * The atomRefs * cannot be schema- or schematron-validated. Instances of this type will * be used in array-style representation of bonds and atomParitys. * It can also be used for arrays of atomIDTypes such as in complex stereochemistry, * geometrical definitions, atom groupings, etc. * * JUMBO expands this into atoms. If any atoms are already present * throws an error. * * @param atomIDs * @throws RuntimeException duplicate atom, bad id, etc */ public void setAtomID(String[] atomIDs) throws RuntimeException { if (atomIDs == null) { throw new RuntimeException("null atomIDs"); } if (this.getAtoms().size() > 0) { throw new RuntimeException("Cannot use atomID with existing children"); } for (String s : atomIDs) { CMLAtom atom = new CMLAtom(s); this.addAtom(atom); } }
public CMLAtom cdkAtomToCMLAtom(IAtomContainer container, IAtom cdkAtom) { CMLAtom cmlAtom = new CMLAtom(); this.checkPrefix(cmlAtom); addAtomID(cdkAtom, cmlAtom);
public CMLAtom cdkAtomToCMLAtom(IAtomContainer container, IAtom cdkAtom) { CMLAtom cmlAtom = new CMLAtom(); this.checkPrefix(cmlAtom); addAtomID(cdkAtom, cmlAtom);