Examples of addAtomContainer()


Examples of org.openscience.cdk.interfaces.IAtomContainerSet.addAtomContainer()

        mol.addBond(bond);
      oldMoleculeSet.addAtomContainer(mol);
      moleculeToAddTo.add(toPaste);
    }
    if (toRemove != null) {
      oldMoleculeSet.addAtomContainer(toRemove);
      moleculeToAddTo.add(toRemove);
      updateAtoms(toRemove, toRemove.atoms());
      newMoleculeSet.removeAtomContainer(toRemove);
    }
    for (IAtomContainer ac: newMoleculeSet.atomContainers())
View Full Code Here

Examples of org.openscience.cdk.interfaces.IAtomContainerSet.addAtomContainer()

            BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
            String line;
            while ((line = in.readLine()) != null) {
                if (line.toLowerCase().startsWith("inchi=")) {
                    moleculeSet.addAtomContainer(parseInChI(line));
                }
            }
            in.close();
        } catch (Exception e) {
View Full Code Here

Examples of org.openscience.cdk.interfaces.IAtomContainerSet.addAtomContainer()

        System.out.println(outFile);
        List<IAtomContainer> molecules= jcpPanel.get2DHub().getRGroupHandler().getrGroupQuery().getAllConfigurations();
        if (molecules.size() > 0) {
          IAtomContainerSet molSet = molecules.get(0).getBuilder().newInstance(IAtomContainerSet.class);
          for (IAtomContainer mol : molecules) {
            molSet.addAtomContainer(mol);
          }
          SDFWriter sdfWriter = new SDFWriter(new FileWriter(outFile));
          sdfWriter.write(molSet);
          sdfWriter.close();
        }
View Full Code Here

Examples of org.openscience.cdk.interfaces.IAtomContainerSet.addAtomContainer()

        Iterator<IAtomContainer> containers = ChemModelManipulator.getAllAtomContainers(model).iterator();
        IAtomContainerSet som = model.getBuilder().newInstance(IAtomContainerSet.class);
        while (containers.hasNext()) {
            //Clone() is here because the SMILESWriter sets valencies and we don't
            //want these changes visible
            som.addAtomContainer((IAtomContainer) containers.next().clone());
        }   
        cow.write(som);
        cow.close();
        if(jcpPanel instanceof JChemPaintPanel)
            ((JChemPaintPanel)jcpPanel).setTitle(jcpPanel.getChemModel().getID());
View Full Code Here

Examples of org.openscience.cdk.interfaces.IAtomContainerSet.addAtomContainer()

    if (rGroupQuery==null || rGroupQuery.getRootStructure() == null || rGroupQuery.getRootStructure().getAtomCount()==0)
      throw new CDKException( "The R-group is empty");

    IAtomContainerSet moleculeSet = chemModel.getBuilder().newInstance(IAtomContainerSet.class);
    moleculeSet.addAtomContainer(rGroupQuery.getRootStructure());
    chemModel.setMoleculeSet(moleculeSet);
    for (int rgrpNum : sortRGroupNumbers()) {
      RGroupList rgrpList = rGroupQuery.getRGroupDefinitions().get(rgrpNum);
      for (RGroup rgrp : rgrpList.getRGroups()) {
        chemModel.getMoleculeSet().addAtomContainer(rgrp.getGroup());
View Full Code Here

Examples of org.openscience.cdk.interfaces.IAtomContainerSet.addAtomContainer()

    }
   
    public void select(IAtomContainer atomContainer) {
        this.chemModel = atomContainer.getBuilder().newInstance(IChemModel.class);
        IAtomContainerSet molSet = atomContainer.getBuilder().newInstance(IAtomContainerSet.class);
        molSet.addAtomContainer(atomContainer);
        this.chemModel.setMoleculeSet(molSet);
    }

    public boolean contains( IChemObject obj ) {
        if(type == Type.NONE)
View Full Code Here

Examples of org.openscience.cdk.interfaces.IAtomContainerSet.addAtomContainer()

            String line;
            while ((line = in.readLine()) != null)
            {
                if (line.toLowerCase().startsWith("inchi=")) {
                    IAtomContainer atc = parser.parseInchi(line);
                    moleculeSet.addAtomContainer(atc);
                }
            }
            in.close();
           
           
View Full Code Here

Examples of org.openscience.cdk.interfaces.IRingSet.addAtomContainer()

            IRing theRing = new org.openscience.cdk.Ring();

            theRing.add(theRingSet.getAtomContainer(i));

            if (theCalculator.isAromatic(theRing, theMolecule)) {
                theModifiedRingSet.addAtomContainer(theRing);
            }
        }

        if (!theModifiedRingSet.isEmpty()) {
            theMolecule.setProperty("Aromatic_Ring", getcheckAromaticityDataFormat(theMolecule, theModifiedRingSet));
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.