use of org.openscience.cdk.ChemSequence in project cdk by cdk.
the class ChemSequenceManipulatorTest method setUp.
@Before
public void setUp() {
molecule1 = new AtomContainer();
atomInMol1 = new Atom("Cl");
molecule1.addAtom(atomInMol1);
molecule1.addAtom(new Atom("Cl"));
bondInMol1 = new Bond(atomInMol1, molecule1.getAtom(1));
molecule1.addBond(bondInMol1);
molecule2 = new AtomContainer();
atomInMol2 = new Atom("O");
atomInMol2.setImplicitHydrogenCount(2);
molecule2.addAtom(atomInMol2);
moleculeSet = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainerSet.class);
moleculeSet.addAtomContainer(molecule1);
moleculeSet.addAtomContainer(molecule2);
reaction = new Reaction();
reaction.addReactant(molecule1);
reaction.addProduct(molecule2);
reactionSet = new ReactionSet();
reactionSet.addReaction(reaction);
chemModel1 = new ChemModel();
chemModel1.setMoleculeSet(moleculeSet);
chemModel2 = new ChemModel();
chemModel2.setReactionSet(reactionSet);
chemSequence = new ChemSequence();
chemSequence.addChemModel(chemModel1);
chemSequence.addChemModel(chemModel2);
}
use of org.openscience.cdk.ChemSequence in project cdk by cdk.
the class INChIHandler method startDocument.
@Override
public void startDocument() {
chemFile = new ChemFile();
chemSequence = new ChemSequence();
chemModel = new ChemModel();
setOfMolecules = new AtomContainerSet();
}
use of org.openscience.cdk.ChemSequence in project cdk by cdk.
the class ChemFileManipulatorTest method setUp.
@Before
public void setUp() {
molecule1 = new AtomContainer();
atomInMol1 = new Atom("Cl");
molecule1.addAtom(atomInMol1);
molecule1.addAtom(new Atom("Cl"));
bondInMol1 = new Bond(atomInMol1, molecule1.getAtom(1));
molecule1.addBond(bondInMol1);
molecule2 = new AtomContainer();
atomInMol2 = new Atom("O");
atomInMol2.setImplicitHydrogenCount(2);
molecule2.addAtom(atomInMol2);
moleculeSet = new AtomContainerSet();
moleculeSet.addAtomContainer(molecule1);
moleculeSet.addAtomContainer(molecule2);
reaction = new Reaction();
reaction.addReactant(molecule1);
reaction.addProduct(molecule2);
reactionSet = new ReactionSet();
reactionSet.addReaction(reaction);
chemModel = new ChemModel();
chemModel.setMoleculeSet(moleculeSet);
chemModel.setReactionSet(reactionSet);
chemSequence1 = new ChemSequence();
chemSequence1.addChemModel(chemModel);
chemSequence2 = new ChemSequence();
chemFile = new ChemFile();
chemFile.addChemSequence(chemSequence1);
chemFile.addChemSequence(chemSequence2);
}
Aggregations