ABBREVGROUP

User 48b145d3f5

22-02-2011 18:57:22

Dear Chemaxon support,


I am using the JChem/Marvin API and I would like to print a structure using  ABBREVGROUP


To do so I have



MolImporter.importMol(mySmiles).toFormat(



"abbrevgroup")


however none of the smiles I have entered returned any result...the output was something like notavailable... how can I get the file with the standard abbreviations? And how can I load a custom file with additional abbreviations?


Thanks,


Francesca


ChemAxon 5433b8e56b

24-02-2011 02:51:33

Hi Francesca,


the abbrevgroups are defined in a tab separated text file that contains information about the abbreviated groups, and a smiles that defines the group itself. You can find the documentation of the format here.


Marvin can not export the abbreviated groups since if you want to define custom groups you have to set at least the abbreviations for them, and other informations. Please check the format documentation on this, and use a text editor to extend the smiles representation of the molecules with the abbreviation information.


Which way do you want to use Marvin with custom defined abreviations? Do you want to use it as beans, or as applet, or you want to use custom abbreviations with the installed application? They have different ways to add custom abbreviations. In applet or in beans you can use the "abbrevgroups" param as described. In the installed application it is a bit tricky, in this case i have to check it explicitly, how you can set custom abbreviations for use.


Regards,
Istvan

User 48b145d3f5

25-02-2011 16:42:42

Hi Istvan,


thanks for your reply.


I am using jchem/marvin libraries from a Java program. So let's suppose I have this line:


Molecule mol = MolImporter.importMol("c1ccccc1");


and I would like to get a String with the abbreviation for benzene, what should I do


-using the built-in abbreviations


-using custom abbreviations


Thanks,


Francesca

ChemAxon 5433b8e56b

25-02-2011 20:57:02

Hi,


Just to be sure: you want to load a file that contains abbrev groups, and after loading you would like to get the abbreviations for the molecules?


If this is the case, then you will need a file with abbreviations... the format of the file is described on the previously linked page.


See the attached example code, that loads such a file, and collects the abbreviations for the molecules.


As a short answer, when you are importing a benzene with MolImporter.importMol("c1ccccc1") then it will be only a smiles. You should specify the abbreviations in the loaded abbrevgroup file. The default abbrevgroups file that is used by MarvinSketch, can be downloaded from this link.


Regards,
Istvan

User 48b145d3f5

01-03-2011 20:54:43

Hi Istvan,


thank you very much for your reply.


I've used the java file attached to store info of abbreviated groups (including custom).


Now I have some R-group in this format



CO* |$;;_AP1$|



and I would like to get the corresponding abbreviation.


Of course if I compare smiles it won't work because it depends on how the smiles was written. i've tried to compare the Molecule.getSGroup(0), unsuccessfully.


What should I do to retrieve the abbreviation given a smiles/Molecule such as 


CO* |$;;_AP1$|


Thank you,


Francesca

ChemAxon 5433b8e56b

07-03-2011 16:39:32

Hi,


unfortunatelly, the given molecule can not be imported as an abreviated group structure. It is a chemaxon extended smiles and abbrevgroup import currently import only plain daylight smiles sturctures.


If you want to compare molecules i can suggest the MolSearch class from the JChem API, or Jchem itself.


And just to make sure this is the simplest way to carry out what you want to achive, what are the aims of your development? Maybe we can suggest an easier way to do that. If it is not public you can also write an e-mail for me.


Regards,
Istvan

User 48b145d3f5

07-03-2011 19:05:33

Thanks Istvan.


So one alternative is that I use an exact structure search.


Something else I could do is to import this structure


CO* |$;;_AP1$|


as an S-group like this:


CO 2


where 2 is the position of the attachment point. So now I would have an Sgroup.


How can I get the name of the abbreviation given the abbreviations stored using the java file that you attached ("Abbreviation.java")?  For example in this case I would get the abbr. OMe.


From what you explained I figure that I can just run an exact search on the smiles and attachment point number, but this could be done without the formal concept of abbreviations in the API, so I am wondering if there's already a method that returns the abbreviation directly.


Thanks,


Francesca


 


 

ChemAxon 5433b8e56b

14-03-2011 18:10:50

Hi,


Unfortunatelly there is not such a method. The file i linked is used by the GUI for the selection of the sgroup to draw based on typing the abbreviation.


This is the only usage of this file format in Marvin, and we search for abbreviations not molecules, so this was not a need before. We made this file format public to enable the users to add custom abbreviations via a single file to Marvin.


The s-group api does not load the abbreviation file, and does not pair the groups for possible matching abbreviations in the file, so the abbreviation is only available on s-groups that has this value set.


I really do not know exactly what do you want to achive, but i assume you are trying to do some transformation on a structure given by somebody or some script/db, or you are searching parts of a structure and replace them with groups. If i am right, the Standardizer, or the Jchem search API can be more useful for you then the abbrevgroup import. But until now i could not really understand the great picture, and i am really not conviced about that the abbrevgroup import is you best coiche, since the Marvin API itself can not give you an abbreviation back for an sgroup based on an abbrevgroup file.


Regards,
Istvan