MehmetAzizYirik / MAYGEN

MAYGEN is an open source chemical structure generator based on the orderly graph generation method.
MIT License
47 stars 15 forks source link

SDF generation issue #66

Closed Saikat248 closed 3 years ago

Saikat248 commented 3 years ago

Recently I have tried to generate different molecule from the chemical formula I have compiled MAYGEN using mvn, compiled successfully. However, output sdf coordinates are all zero. Same is true for the pre-compiled version 1.6. The command I am using under Linux is

java -jar MAYGEN-1.7.jar -f C2OH4 -v -t -d conformer

output sdf is shown like ` Molecule 1 MAYGEN 20210615 7 6 0 0 0 0 0 0 0999 V2000 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 1 2 2 0 0 0 0 1 5 1 0 0 0 0 2 6 1 0 0 0 0 2 7 1 0 0 0 0 3 1 1 0 0 0 0 3 4 1 0 0 0 0 M END

$$$$

Molecule 2 MAYGEN 20210615 7 7 0 0 0 0 0 0 0999 V2000 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 1 4 1 0 0 0 0 1 5 1 0 0 0 0 2 6 1 0 0 0 0 2 7 1 0 0 0 0 3 1 1 0 0 0 0 3 2 1 0 0 0 0 M END

$$$$

Molecule 3 MAYGEN 20210615 7 6 0 0 0 0 0 0 0999 V2000 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 1 4 1 0 0 0 0 2 5 1 0 0 0 0 2 6 1 0 0 0 0 2 7 1 0 0 0 0 3 1 2 0 0 0 0 M END

$$$$`

Am I making any mistake?

Saikat248 commented 3 years ago

ok, I can understand. Is there a way to get the proper sdf of the molecules?

steinbeck commented 3 years ago

Hi Saikat,

the coordinate generation would add a significant computational overhead. The vast majority of users would process MAYGEN output with further code or other software which could be able to generate coordinates for isomers of interest. Even small molecular formulae have tens of thousands of isomers and I consider it a waste of resources to compute coordinates for all of them since, as I said, users will always only be interested in viewing a few of them.

Having said that, we have a number of options:

  1. You (the user) can pipe those isomers that you want to view into Open Babel. It will generate coordinates for you and write graphics to disc. I am not at my laptop right now to look the command up for you.
  2. Since MAYGEN depends on the CDK, we can add a switch to generate coordinates, but again, it will make output much slower. Hint to our developers: The class to generate coordinates is the StructureDiagramGenerator (http://cdk.github.io/cdk/latest/docs/api/org/openscience/cdk/layout/StructureDiagramGenerator.html)

Kind regards,

Chris

— Prof. Dr. Christoph Steinbeck Analytical Chemistry - Cheminformatics and Chemometrics Institute for Inorganic and Analytical Chemistry Friedrich-Schiller-University Lessingstr. 8, D-07743 Jena, Germany Phone Secretariat: +49-3641-948171 Email: @.*** http://orcid.org/0000-0001-6966-0814

Am 27.08.2021 um 07:32 schrieb Saikat Roy @.***>:  ok, I can understand. Is there a way to get the proper sdf of the molecules?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

Saikat248 commented 3 years ago

Dear Dr. Christoph Steinbeck

Thanks for your suggestions. I got the point. Now I can generate the svg images with the openabel with obabel -isdf *.sdf -O sample.svg

MehmetAzizYirik commented 3 years ago

@Saikat248 Hi Saikat, I added today the atom coordinate generation for SDF file and in the V1.7. Since the coordinate generation slows down the algorithm, there are two options for SDF: -sdf or -sdfCoord. You can use -sdfCoord to generate also atom coordinates for your SDF.