User 646de8ab9c
16-11-2015 14:00:15
Dear,
I am already using MarvinJS and the molExport function of the webservices in a web interface. When the user is drawing a structure in MarvinJS, I would like to automatically calculate the name (common and IUPAC) of the structure that I obtained from MarvinJS.
I found this service "/rest-v0/data/sample/table/ChEBI_lite_3star/detail/4", but it seems that I am not in a way to give the "cd_id" parameters.
Is-there a way to use this service based on a structure data (mrv, mol)? Or is-there an other way to calculate the name of a structure?
Thanks, Lionel
ChemAxon 13811e1703
16-11-2015 14:53:26
Hi Lionel,
All of the calculator services has stateless version where you can provide the structure in the request, for example:
POST /rest-v0/util/calculate/molExport
Content-Type: application/json
{
"structure": "CCCCCC",
"parameters": "name"
}
Which will give you back the name "hexane" and the "structure" element in the request can be of any kind of format!
(https://restdemo.chemaxon.com/apidocs/#molExport)
Regards,
Peter
ChemAxon 13811e1703
16-11-2015 14:59:30
Also, there is a dedicated service for your usecase:
POST /rest-v0/util/calculate/names
Content-Type: application/json
{
"structure": "CCCCC",
"parameters" : {
"inchiAux": false,
"uniqueSmiles": false
}
}
This will generate all the common names and also iupac name as well.
Regards,
Peter
User 646de8ab9c
16-11-2015 16:12:56
Hi Peter,
Thanks for your answer.
It seems that your second solution is working but I have an error message. It seems that I need a specific license to do this structure to name conversion. Can-you confirm-me this?
Regards, Lionel
ChemAxon 13811e1703
17-11-2015 07:58:07
Hi Lionel,
Yes I forgot that, you need naming license for any structure2name or name2structure conversions. Can you please contact our sales?
Regards,
Peter
User 646de8ab9c
17-11-2015 08:13:28
Hi Peter,
No problem, I will ask to Annamaria,
Cheers, Lionel
ChemAxon e7b9408ca1
24-11-2015 10:07:19
Lionel,
One other option to generate the (most popular) common name is to use the molExport function with the "name:common" parameter. For instance:
POST /rest-v0/util/calculate/molExport
Content-Type: application/json
{
"structure": "CC(=O)OC1=CC=CC=C1C(O)=O",
"parameters": "name:common"
}
This will return the name "aspirin".
Daniel
User 646de8ab9c
24-11-2015 11:32:25
Dear Daniel,
Thanks for your solution. This works for me.
This works, even if I obtain some strange results:
- for "CCCCC" I obtain "Pentane" for IUPAC and "caswell no. 642AA" for common name. Whereas in MarvinSketch I obtain Pentane for both IUPAC and common name
- for the retinaldehyde structure, I correctly obtain the IUPAC name, but I cannot obtain the common name. Whereas in MarvinSketch, I obtain the same IUPAC name, AND "retinaldehyde" as the common name ("traditional name")
Cheers,
Lionel
ChemAxon e7b9408ca1
24-11-2015 11:49:06
Dear Lionel,
Good to hear this works. Regarding the issues:
- for the first one, my mistake, you should use "name:t" (t for traditional) instead of "name:common"
- for the second one, this is an issue in the webservice implementation that we just discovered as well and will fix. In the mean time, a workaround is to use "name:i" (i for IUPAC) instead of "name"
Cheers,
Daniel
User 646de8ab9c
24-11-2015 12:01:16
The "name:t" is great, and also work for retinaldehyde.
This is perfect, Thanks!
Lionel