Converting CHIME to MOL

User fc9fee678e

14-06-2010 16:28:17

I am trying to use ChemAxon libraries to read a chime string and then convert it to mol. Is there an easy way of doing that? So far I noticed that you can read a chime string and the object can verify that it is a format of chime but that is as far as it goes. I am using the latest versions of Marvin libs.


Here is  sample of what I have used:


    public static void main(String[] args) {


        String chime = "CYAAFQwAMfwQB5HKGydsYJwBSyBRAa^iAEWVwVlmeBmEfiIn$KuGuTWrueIZEKvvAR2XmnZnbRQ7kTh^xCL9$2QGSpYpKImw6Kpa8CtSIoJMNjegFRVrDcM^zCAOhvZLnSPX^KAlNydy8$mDcd8MnT7VnIPF^6rD^9lNbd6rpQhXTURbi94k2BaEsokSVogXWOjoke$g1hDSnZfQbNFlOrQS3CHjTRLNXuKN0JtQ0iaslvAhl4z4SkI7QG7nq81sLKXRgTqqmdLVtGKhzMKVupqlRNmPCuecueZJzgqrkN6IFrvPrcvetdd5g1ui1kOJVLniG5X5kIRli1ldGdlROPst1oOd8hpi5wNFKZzKMKupNrSxckC3yX5wYr7HaTq3lUpqFWSlCh$772VX3232o0MVqsVtVHL7hGE37VRndKhRRt49pJnkyTEFjCQn96MSyK6SkJ9sfS7ORnCZSXX3tTrz3ESRbOXJjhLiurmO0Rym3iPT33PaeLcZqnxvH7InKeDjd9uOTJzaX^sADoWzyWmEgNm1gLd$7C1K1Qfb95JaxDXFYSQtZK4ZNymyji8RdCUtXPOHZCmMoUQrzQATW5cEdIOP^UPC0kwLAYx5Cy1FGJqemWircU9kNe5aMuIXI8tZYYd9VZ6MR2cjrVnFXFtpdYWgITLziZNuR4YoGXjFqrzAPnBY98alfeXOUJfOAeXzP^xHO9zxst7T";


        ChimeRecognizer recognizer = new ChimeRecognizer("CHIME");


        System.out.println("is chime: "+recognizer.canBeChime(chime));


        try {


            Molecule mol = MolImporter.importMol(chime);


            System.out.println("count: "+mol.getAtomCount());


        } catch (IOException ex) {


            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);


        }


    }


 


 


When I run this code, I get the following exception:


 


chemaxon.formats.MolFormatException: Cannot create record reader for the "chime" format


        at chemaxon.marvin.io.MRecordImporter.<init>(Unknown Source)


        at chemaxon.formats.MolImporter.init(Unknown Source)


        at chemaxon.formats.MolImporter.<init>(Unknown Source)


        at chemaxon.formats.MolImporter.importMol(Unknown Source)


        at chemaxon.formats.MolImporter.importMol(Unknown Source)


        at chemaxon.Main.main(Main.java:32)


 


 


Any help is greatly appreciated!

ChemAxon 5433b8e56b

16-06-2010 13:35:21

Hi,


Regarding to this documentation, and our source codes, we currently not support import or export in chime format. The recognition may work only, and that is only exists for some error reporting proposes.


Best regards,
Istvan