Package org.openscience.cdk.interfaces

Examples of org.openscience.cdk.interfaces.IReactionSet


        // don't create a new reaction
        if (reactants.isEmpty() && products.isEmpty())
            return;
       
        // do reaction creation
        IReactionSet reactionSet = super.chemModelRelay.getChemModel().getReactionSet();
        if (reactionSet == null) {
            reactionSet = new ReactionChain(); //reactionSet = super.chemModelRelay.getChemModel().getBuilder().newInstance(IReactionSet.class);
            super.chemModelRelay.getChemModel().setReactionSet(reactionSet);
        }
        IReaction reaction = moleculeSet.getBuilder().newInstance(IReaction.class);
        ((ReactionChain) reactionSet).addReaction(reaction, reactionSet.getReactionCount()); //reactionSet.addReaction(reaction);
        reaction.setID(ReactionHub.newReactionId(chemModelRelay));
       
        for (IAtomContainer reactant : reactants) {
            ReactionHub.makeReactantInExistingReaction((ControllerHub) super.chemModelRelay,
                                                       reaction.getID(),
View Full Code Here


        IReaction reaction = newContainer.getBuilder().newInstance(IReaction.class);
        reaction.setID(newReactionId(controllerhub));
        IAtomContainer mol=newContainer.getBuilder().newInstance(IAtomContainer.class,newContainer);
        mol.setID(newContainer.getID());
        reaction.addReactant(mol);
        IReactionSet reactionSet = chemModel.getReactionSet();
        if (reactionSet == null)
        {
            reactionSet = chemModel.getBuilder().newInstance(IReactionSet.class);
        }
        reactionSet.addReaction(reaction);
        chemModel.setReactionSet(reactionSet);
        chemModel.getMoleculeSet().removeAtomContainer(oldcontainer);
        if(chemModel.getMoleculeSet().getAtomContainerCount()==0)
            chemModel.getMoleculeSet().addAtomContainer(chemModel.getBuilder().newInstance(IAtomContainer.class));
        if(controllerhub.getUndoRedoFactory()!=null && controllerhub.getUndoRedoHandler()!=null){
View Full Code Here

        IReaction reaction = newContainer.getBuilder().newInstance(IReaction.class);
        reaction.setID(newReactionId(controllerhub));
        IAtomContainer mol=newContainer.getBuilder().newInstance(IAtomContainer.class,newContainer);
        mol.setID(newContainer.getID());
        reaction.addProduct(mol);
        IReactionSet reactionSet = chemModel.getReactionSet();
        if (reactionSet == null)
        {
            reactionSet = chemModel.getBuilder().newInstance(IReactionSet.class);
        }
        reactionSet.addReaction(reaction);
        chemModel.setReactionSet(reactionSet);
        chemModel.getMoleculeSet().removeAtomContainer(oldcontainer);
        if(chemModel.getMoleculeSet().getAtomContainerCount()==0)
            chemModel.getMoleculeSet().addAtomContainer(chemModel.getBuilder().newInstance(IAtomContainer.class));
        if(controllerhub.getUndoRedoFactory()!=null && controllerhub.getUndoRedoHandler()!=null){
View Full Code Here

TOP

Related Classes of org.openscience.cdk.interfaces.IReactionSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.