Actelion / openchemlib

Open source Java-based chemistry library
Other
76 stars 27 forks source link

IDCodeParser(true) and coordinates #66

Open lpatiny opened 2 years ago

lpatiny commented 2 years ago

@thsa When I create a molecule from IDCode using IDCodeParser(true); and I generate a molfile, the molfile does not contains atom coordinates.

It seems to me that the main difference between true and false in IDCodeParser is that you can recreate (or not) an idCode using 'getIDCode()' and that if you would like to have coordinates you need to inventCoordinates.

Maybe the comment in the following code could be more clear:

https://github.com/Actelion/openchemlib/blob/master/src/main/java/com/actelion/research/chem/IDCodeParser.java#L8-L15

thsa commented 2 years ago

System.out.println(new MolfileCreator(new IDCodeParser(true).getCompactMolecule("diTD@@qJZUkfFjjjbH@")).getMolfile());

produces this output, which includes coordinates. Can you show the source code you use?:

Actelion Java MolfileCreator 1.0

9 10 0 0 1 0 0 0 0 0999 V2000 -0.9659 -0.2588 -0.0000 O 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 -1.6730 0.4483 -0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 -1.0000 -0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 0.2588 0.9659 -0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1.0000 -0.0000 -0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -1.4142 1.4142 -0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1.0000 -1.0000 -0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -0.4483 1.6730 -0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 2 1 1 1 0 0 0 1 3 1 0 0 0 0 2 4 1 0 0 0 0 2 5 1 0 0 0 0 2 6 1 0 0 0 0 3 7 1 0 0 0 0 4 8 1 0 0 0 0 5 9 1 0 0 0 0 6 8 1 0 0 0 0 7 9 1 0 0 0 0 M END


Von: Luc Patiny @.> Gesendet: Freitag, 1. Oktober 2021 10:00 An: Actelion/openchemlib @.> Cc: Thomas Sander @.>; Mention @.> Betreff: [Actelion/openchemlib] IDCodeParser(true) and coordinates (#66)

@thsahttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fthsa&data=04%7C01%7Cthomas.sander%40idorsia.com%7C7cf2190d6b404c2cc0d008d984b198d0%7Cbb9214bf0cb941fdbd55d0c1c3eda110%7C0%7C0%7C637686720570581693%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=dg%2FuW8NSun4SZ9kiKctg2RP6%2BpUlQs4zSWS8ND8saZk%3D&reserved=0 When I create a molecule from IDCode using IDCodeParser(true); and I generate a molfile, the molfile does not contains atom coordinates.

It seems to me that the main difference between true and false in IDCodeParser is that you can recreate (or not) an idCode using 'getIDCode()' and that if you would like to have coordinates you need to inventCoordinates.

Maybe the comment in the following code could be more clear:

https://github.com/Actelion/openchemlib/blob/master/src/main/java/com/actelion/research/chem/IDCodeParser.java#L8-L15https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FActelion%2Fopenchemlib%2Fblob%2Fmaster%2Fsrc%2Fmain%2Fjava%2Fcom%2Factelion%2Fresearch%2Fchem%2FIDCodeParser.java%23L8-L15&data=04%7C01%7Cthomas.sander%40idorsia.com%7C7cf2190d6b404c2cc0d008d984b198d0%7Cbb9214bf0cb941fdbd55d0c1c3eda110%7C0%7C0%7C637686720570581693%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=X%2FrJxuEpfS7JYAzjN72ODcW2H58QUL%2Blvx4x46Vx61c%3D&reserved=0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FActelion%2Fopenchemlib%2Fissues%2F66&data=04%7C01%7Cthomas.sander%40idorsia.com%7C7cf2190d6b404c2cc0d008d984b198d0%7Cbb9214bf0cb941fdbd55d0c1c3eda110%7C0%7C0%7C637686720570591656%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ORWL5fg3QlBwl3WS2Fom5bUMZ%2F4hpRdG2pVX3S9MPlY%3D&reserved=0, or unsubscribehttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACNFEBR753RIXZWN4P357LLUEVTDNANCNFSM5FECV22A&data=04%7C01%7Cthomas.sander%40idorsia.com%7C7cf2190d6b404c2cc0d008d984b198d0%7Cbb9214bf0cb941fdbd55d0c1c3eda110%7C0%7C0%7C637686720570591656%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=rUpZYaJLR2%2BcpyEXmE8FfPHV5%2Blg3Y%2BAL2Vd582bAJ4%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cthomas.sander%40idorsia.com%7C7cf2190d6b404c2cc0d008d984b198d0%7Cbb9214bf0cb941fdbd55d0c1c3eda110%7C0%7C0%7C637686720570601606%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1Kr7RJ%2B56BO75tGQjesDkmmHctowr01%2FcahzZ5muB9I%3D&reserved=0 or Androidhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cthomas.sander%40idorsia.com%7C7cf2190d6b404c2cc0d008d984b198d0%7Cbb9214bf0cb941fdbd55d0c1c3eda110%7C0%7C0%7C637686720570601606%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=GrqJLO%2B8P99ac6oAGT%2BEvNJ82AHFBFcGfGTwQQuf4%2Fs%3D&reserved=0.

The information of this email and in any file transmitted with it is strictly confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any copying, distribution or any other use of this email is prohibited and may be unlawful. In such case, you should please notify the sender immediately and destroy this email. The content of this email is not legally binding unless confirmed by letter. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of the sender's company.