Examples of addReactant()


Examples of org.openscience.cdk.interfaces.IReaction.addReactant()

    IReaction reaction = chemModel.getBuilder().newInstance(IReaction.class);
    reaction.setID(reactionID);
    IAtomContainer mol=chemModel.getBuilder().newInstance(IAtomContainer.class,movedContainer);
    mol.setID(movedContainer.getID());
    if(reactantOrProduct)
      reaction.addReactant(mol);
    else
      reaction.addProduct(mol);
    if(chemModel.getReactionSet()==null)
      chemModel.setReactionSet(chemModel.getBuilder().newInstance(IReactionSet.class));
    chemModel.getReactionSet().addReaction(reaction);
View Full Code Here

Examples of org.openscience.cdk.interfaces.IReaction.addReactant()

        IChemModel chemModel = controllerhub.getChemModel();
        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);
        }
View Full Code Here

Examples of org.openscience.cdk.interfaces.IReaction.addReactant()

            IAtomContainer newContainer, IAtomContainer oldcontainer) {
        IChemModel chemModel = controllerhub.getChemModel();
        IReaction reaction = ReactionSetManipulator.getReactionByReactionID(chemModel.getReactionSet(), reactionId);
        IAtomContainer mol=newContainer.getBuilder().newInstance(IAtomContainer.class,newContainer);
        mol.setID(newContainer.getID());
        reaction.addReactant(mol);
        chemModel.getMoleculeSet().removeAtomContainer(oldcontainer);
        if(chemModel.getMoleculeSet().getAtomContainerCount()==0)
            chemModel.getMoleculeSet().addAtomContainer(chemModel.getBuilder().newInstance(IAtomContainer.class));
        if(controllerhub.getUndoRedoFactory()!=null && controllerhub.getUndoRedoHandler()!=null){
            IUndoRedoable undoredo = controllerhub.getUndoRedoFactory().getMakeReactantOrProductInExistingReactionEdit(chemModel, newContainer, oldcontainer, reactionId, true, "Make Reactant in "+reactionId);
View Full Code Here

Examples of org.openscience.cdk.interfaces.IReaction.addReactant()

          chemModel.getReactionSet().addReaction(reaction);
    }
    IAtomContainer mol=chemModel.getBuilder().newInstance(IAtomContainer.class,movedContainer);
    mol.setID(movedContainer.getID());
    if(reactantOrProduct)
      reaction.addReactant(mol);
    else
      reaction.addProduct(mol);
    chemModel.getMoleculeSet().removeAtomContainer(oldContainer);
        if(chemModel.getMoleculeSet().getAtomContainerCount()==0)
            chemModel.getMoleculeSet().addAtomContainer(chemModel.getBuilder().newInstance(IAtomContainer.class));
View Full Code Here

Examples of org.sbml.jsbml.Reaction.addReactant()

    fd.setMath(math);
    System.out.println(math.toMathML());
   
    Species species = m.createSpecies("spec");
    Reaction r = m.createReaction("r");
    r.addReactant(new SpeciesReference(species));
    KineticLaw kl = new KineticLaw(level, version);
    math = new ASTNode(fd, kl);
    math.addChild(new ASTNode(species, kl));
    math = ASTNode.times(math, new ASTNode(3.7, 8, kl));
    kl.setMath(math);
View Full Code Here

Examples of org.sbml.jsbml.Reaction.addReactant()

              SpeciesReference speciesReference = (SpeciesReference) newContextObject;
              speciesReference.initDefaults();

              if (list.getSBaseListType().equals(
                  ListOf.Type.listOfReactants)) {
                reaction.addReactant(speciesReference);

                return speciesReference;
              } else if (list.getSBaseListType().equals(
                  ListOf.Type.listOfProducts)) {
                reaction.addProduct(speciesReference);
View Full Code Here

Examples of org.sbml.jsbml.Reaction.addReactant()

              SpeciesReference speciesReference = (SpeciesReference) newContextObject;
              speciesReference.initDefaults();

              if (list.getSBaseListType().equals(
                  ListOf.Type.listOfReactants)) {
                reaction.addReactant(speciesReference);

                return speciesReference;
              } else if (list.getSBaseListType().equals(
                  ListOf.Type.listOfProducts)) {
                reaction.addProduct(speciesReference);
View Full Code Here

Examples of org.sbml.jsbml.Reaction.addReactant()

            if (elementName.equals("specieReference")) {
              SpeciesReference speciesReference = (SpeciesReference) newContextObject;

              if (list.getSBaseListType().equals(
                  ListOf.Type.listOfReactants)) {
                reaction.addReactant(speciesReference);

                return speciesReference;
              } else if (list.getSBaseListType().equals(
                  ListOf.Type.listOfProducts)) {
                reaction.addProduct(speciesReference);
View Full Code Here

Examples of org.sbml.jsbml.Reaction.addReactant()

    SBMLDocument doc=new SBMLDocument(2,4);
    Model m=doc.createModel("model1");
    Reaction r = m.createReaction("id1");
    SpeciesReference s = new SpeciesReference();
    s.setMetaId("meta2");
    r.addReactant(s);
    r.setMetaId("meta");

    System.out.println("Reaction parent and model                    : " + r.getParent() + " " + r.getModel() + "\n");

    Reaction clonedReaction = r.clone();
View Full Code Here

Examples of org.sbml.jsbml.Reaction.addReactant()

              SpeciesReference speciesReference = (SpeciesReference) newContextObject;
              speciesReference.initDefaults();

              if (list.getSBaseListType().equals(
                  ListOf.Type.listOfReactants)) {
                reaction.addReactant(speciesReference);

                return speciesReference;
              } else if (list.getSBaseListType().equals(
                  ListOf.Type.listOfProducts)) {
                reaction.addProduct(speciesReference);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.