private void addAtom ( String newAtomType , IAtom otherConnectingAtom , Order bondOrder , int hydrogenCount ) { //Create the new atom and bond. IAtom newAtom = currentMolecule . getBuilder ( ) . newInstance ( IAtom . class , newAtomType ) ; newAtom . setImplicitHydrogenCount ( hydrogenCount ) ; IBond newBond = currentMolecule . getBuilder ( ) . newInstance ( IBond . class , newAtom , otherConnectingAtom , bondOrder ) ; //Add the new atom and bond to the molecule. currentMolecule . addAtom ( newAtom ) ; currentMolecule . addBond ( newBond ) ; }
Adds an atom to the current molecule .