Examples of generateCoordinates()


Examples of org.openscience.cdk.layout.StructureDiagramGenerator.generateCoordinates()

    for(int i=0;i<originalMols.getMoleculeCount();i++) {
      IMolecule mol = originalMols.getMolecule(i);
      sdg.setMolecule(mol);
      //sdg.setMolecule(new Molecule(th.getTemplateAt(6)));
      sdg.setTemplateHandler(th);
      sdg.generateCoordinates();
      mols.addMolecule(sdg.getMolecule());
    }
    if(mols.getMoleculeCount() == 0) return null;
    sdg = null;
    return getMoleculeForMoleculeRange(0, mols.getMoleculeCount()-1, mols);
View Full Code Here

Examples of org.openscience.cdk.layout.StructureDiagramGenerator.generateCoordinates()

            // now generate 2D coordinates
            StructureDiagramGenerator sdg = new StructureDiagramGenerator();
            sdg.setTemplateHandler(new TemplateHandler(moleculeSet.getBuilder()));
            try {
                sdg.setMolecule(molecule);
                sdg.generateCoordinates();
                molecule = sdg.getMolecule();
            } catch (Exception exc) {
                JOptionPane.showMessageDialog(chemPaintPanel, GT.get("Structure could not be generated"));
                throw new CDKException(
                        "Cannot depict structure");
View Full Code Here

Examples of org.openscience.cdk.layout.StructureDiagramGenerator.generateCoordinates()

        StructureDiagramGenerator sdg = new StructureDiagramGenerator();
        for (int atIdx = 0; atIdx < molecules.size(); atIdx++) {
            IAtomContainer mol = molecules.get(atIdx);
            sdg.setMolecule(mol.getBuilder().newInstance(IAtomContainer.class,mol));
            try {
                sdg.generateCoordinates();
            } catch (Exception e) {
                e.printStackTrace();
            }
            IAtomContainer ac = sdg.getMolecule();
            for(int i=0;i<ac.getAtomCount();i++){
View Full Code Here

Examples of org.openscience.cdk.layout.StructureDiagramGenerator.generateCoordinates()

                                new StructureDiagramGenerator((IAtomContainer)mols.getAtomContainer(i));

                            sdg.setTemplateHandler(
                                    new TemplateHandler(toPaste.getBuilder())
                            );
                            sdg.generateCoordinates();
                        }
                        //SMILES parser sets valencies, unset
                        for(int i=0;i<toPaste.getAtomCount();i++){
                            toPaste.getAtom(i).setValency(null);
                        }
View Full Code Here

Examples of org.openscience.cdk.layout.StructureDiagramGenerator.generateCoordinates()

            atc.setProperty(CDKConstants.TITLE, null);

            // Generate coordinates for the atom container
            StructureDiagramGenerator sdg =
                new StructureDiagramGenerator((IAtomContainer)atc);
            sdg.generateCoordinates();


        } finally {

            //Always delete any temporary files
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.