Identifying Invalid structure

User 82b20b535e

03-04-2015 14:18:52

 


 I have a question related to the invalid
structure. If there are more than one bond with Fluoride atom, our scientist
are indicating that the structure is wrong or invalid. They also indicate that
the compound attributes should not be calculated and should display some kind of
 error indicating it exceeds standard
valency
.


As a developer how do I run this validation in Marvin JS to identifying this as an invalid structure.


Please see attached the structure data

User 870ab5b546

06-04-2015 16:09:44

You include a line such as this one after the sketcher's Javascript object loads.


marvinSketcherInstance.setDisplaySettings({"valenceErrorVisible", true});

User 82b20b535e

06-04-2015 16:26:41

Hi Bob,


By default the setting what you have indicated is enabled see screen shot attached. Do you want me to force that setting again through code.


I am running on latest build ( 15.3 ) if version is required.


I want to be clear with my answer as i have to let Scientist know that this is what is happening. Hope i am clear with my question?


Thanks


 


 

User 870ab5b546

06-04-2015 17:51:51

When I paste your invalid structure in MarvinJS 15.3.30 that has had the valence error flag turned on, the F is rendered with a background in red, indicating the valence error. See the screen shot. If that's not what you see, then there's a problem with your installation or a bug in your version of MarvinJS.

User 82b20b535e

07-04-2015 12:45:09

Hi Bob,


This is where I had questions? How does the red background on F indicate an error to a user without chemaxon background? Also when I submit this compound to calculate compound attributes , IJChemMolecule.Calculations will provide all the values even though it indicates Red background under F.


Hope I am clear with my question?


Thanks for your response. Is there a way I can display an error based on value or some attributes?


Thanks

User 870ab5b546

07-04-2015 13:48:27

The red background will draw the eye to the particular atom, and I think any knowledgeable chemist will notice the valence error at that point.


If you are concerned that the user won't understand the meaning of the red background, you can include some text on the page that explains that an atom with a red background has a valence error.


If you want a particular action when a user draws a structure that has a valence error, things get more complicated. You can write a MarvinJS method on("molchange", function()) that, upon the user changing a structure, gets the structure's MRV and then calls a Javascript method that uses AJAX to call a JSP page that uses JChem methods to convert the MRV to a Molecule object and then calls the JChem method hasValenceError(). But you will need a JChem license to do all that.


This discussion may be relevant.

User 82b20b535e

07-04-2015 14:06:05

Hi Bob,


Thank you your suggestion and I truly appreciate your feedback.  We have JChem license as well but since users is on the Web access Marvin JS and do not have access to JChem desktop products.


What I was looking for as attached , In MarvinSketch we get the below error which indicates there is an error and user could view the error as well. 


I had informed our scientist before even posting in form but now I can goback with evidence. 


Thanks again

User 870ab5b546

07-04-2015 14:14:55










kempegowda wrote:

We have JChem license as well but since users is on the Web access Marvin JS and do not have access to JChem desktop products.



The user does not need access to JChem desktop products to do what I suggest. The same server that delivers MarvinJS to the user can also make the JChem library available to your JSP page.

User 82b20b535e

07-04-2015 14:21:41

Hi Bob,


I totally got what you said but I was looking more from the tool to display error as marvin Sketch displayed error with out any custom code. But I am very happy with ChemAxon product and support.


Thanks for all your help and based on feedback from Scientist I would have to act upon.


Thanks

ChemAxon 76c88f5366

07-04-2015 15:14:04

Dear Dhananjaya,


In the picture of Marvin Sketch you have attached,  you indicated the built in Structure Checker in a red rectangle. 


In Marvin JS Structure Checker is not implemented, however you can use this functionality via JChem webservices. (You need to have a JChem webservices licence.)


 For more details you can see the API of JChem webservices here:
(8.4 Structure Checker: https://restdemo.chemaxon.com/apidocs/#structureChecker )


If JChem Webservice is installed, you need only some extra code to call that service from your page where Marvin JS is embedded. 


Best Regards,
Eszter

User 82b20b535e

07-04-2015 15:42:21

Hi Eszter,


Is there a road map of Marvin JS to bring those Structure Checker functionality from Marvin Sketch. Its is a good feature for Marvin JS as a selling point.


Thanks for your suggestion as it would be hard to justify to get JChem Web Services for just this functionality.


Thanks

ChemAxon f052bdfe3c

08-04-2015 12:40:10

Currently the integration with Structure Checker is not in the roadmap. Marvin JS is a browser component, the integration with another ChemAxon component can be consultancy job. Please let me know if you are interested. 


 


I think Bob's idea could also work: "If you are concerned that the user won't understand the meaning of the red background, you can include some text on the page that explains that an atom with a red background has a valence error." 


Best regards,


Efi