Package org.openscience.cdk.layout

Examples of org.openscience.cdk.layout.TemplateHandler


  public static IMolecule getMoleculeWith2DCoords(IMolecule inputMol) throws Exception {
    return getInstance().getMoleculeStructure(inputMol);
  }
 
  private MultiFragmentStructureDiagramGenerator() {
    th = new TemplateHandler(DefaultChemObjectBuilder.getInstance());
    try {
      ResourceGetter rg = new ResourceGetter("uk/ac/cam/ch/wwmm/ptclib/cdk/resources/");
      for(String s : rg.getStrings("extraTemplates.txt")) {
        if(s != null && s.length() > 0) th.addMolecule(StructureConverter.cmlToMolecule(rg.getStream(s)));
      }
View Full Code Here


        }

        if(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) {
View Full Code Here

                        {
                            StructureDiagramGenerator sdg =
                                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++){
View Full Code Here

    IChemObjectBuilder builder = DefaultChemObjectBuilder
        .getInstance();

    if (diagramGenerator == null) {
      diagramGenerator = new StructureDiagramGenerator();
      diagramGenerator.setTemplateHandler(new TemplateHandler(builder));
    }
    if (container instanceof IAtomContainer) {
      diagramGenerator.setMolecule((IAtomContainer) container);
    } else {
      diagramGenerator.setMolecule(builder.newInstance(IAtomContainer.class,container));
View Full Code Here

TOP

Related Classes of org.openscience.cdk.layout.TemplateHandler

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.