Package org.openscience.cdk.interfaces

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


    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

    }
   
    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

            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

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.