public static byte [ ] generateImageHELMMolecule ( HELM2Notation helm2notation ) throws BuilderMoleculeException , CTKException , IOException , ChemistryException { LOG . info ( "Image generation process of HELM molecule starts" ) ; /* get SMILES representation for the whole molecule */ String smiles = SMILES . getSMILESForAll ( helm2notation ) ; LOG . info ( "Get for the whole HELMNotation the smiles representation" ) ; AbstractMolecule molecule = Chemistry . getInstance ( ) . getManipulator ( ) . getMolecule ( smiles , null ) ; LOG . info ( "Molecule was created using the smiles generation" ) ; String molFile = Chemistry . getInstance ( ) . getManipulator ( ) . convertMolecule ( molecule , AbstractChemistryManipulator . StType . MOLFILE ) ; LOG . info ( "Generate molfile for the built molecule(s)" ) ; return Chemistry . getInstance ( ) . getManipulator ( ) . renderMol ( molFile , OutputType . PNG , PICTURE_WIDTH , PICTURE_HEIGHT , ( int ) Long . parseLong ( "D3D3D3" , 16 ) ) ; }
method to generate an image of the HELM molecule