User eda6f877b4
26-01-2012 19:38:23
Hi,
Chemists using chemicalinventory has reported a problem with nitro-groups and the search results returned:
Nitrogroups (-NO2) can be written/drawn in to different ways that both are accepted/correct:

However, they are apparently registered as different groups since a search on our database with the two
“different” structures as substructures gives different results – but should be exacely the same:
Searching with the “neutral” version retrieves 30 compounds:

But when you run the search with the version below you get 341 hits:

Version information:
Marvin sketch: 5.4.0.1
JChem: 5.4.0.1015
Database MSSQL 2008 R2, IIS 7, .net application.
This is causing serious problems for the users when searching.
Best regards
Dann
ChemAxon 42004978e8
27-01-2012 08:50:10
User eda6f877b4
27-01-2012 11:52:31
Hi Robert,
Thanks for taking the time with this issue.
just need to get this the correct way.(I am NOT a chemist so nitro group transformation/standardization leaves me in the dark :-))
Just wondering what the best way to approach this..
Will I have to change the strucutures in the db, or will a standardization xml perform the transformation when searching..? (leaving the db as is, just altering the search).
UPDATE:
I am creating a method that will read a structure from the DB apply standardization and return the structure..
This leaves me with a method like this:
private void ApplyStandardizer(Structure st) {
Standardizer std = new Standardizer(new java.io.File(@"standardization.xml"));
if (std != null) {
std.setFinalClean();
Molecule m = st.StructureMolecule;
if (m != null) {
std.standardize(m);
// get applied task indexes
int[] inds = std.getAppliedTaskIndexes();
// get applied task IDs
String[] ids = std.getAppliedTaskIDs();
// store applied task indexes and IDs in molecule properties
String indsprop = "";
for (int i = 0; i < inds.Length; ++i) {
indsprop += inds + " ";
}
String idsprop = "";
for (int i = 0; i < ids.Length; ++i) {
idsprop += ids + " ";
}
m.setProperty("TASK_INDEXES", indsprop);
m.setProperty("TASK_IDS", idsprop);
MolHandler mol = new MolHandler(m);
}
}
}
2 questions here:
A.: What does the following do??? and is it neccecary?
-------------------------------------------------
// get applied task indexes
int[] inds = std.getAppliedTaskIndexes();
// get applied task IDs
String[] ids = std.getAppliedTaskIDs();
// store applied task indexes and IDs in molecule properties
String indsprop = "";
for (int i = 0; i < inds.Length; ++i) {
indsprop += inds + " ";
}
String idsprop = "";
for (int i = 0; i < ids.Length; ++i) {
idsprop += ids + " ";
}
m.setProperty("TASK_INDEXES", indsprop);
m.setProperty("TASK_IDS", idsprop);
-------------------------------------------------
B: I Use a home grown Structure object that contains properties from the structure table. one of them being the cd_smiles that I use to create the molecule object.. but how do I go the other way..?
Molecule -> cd_smiles (string)??
Don't seem to find a method in the molhandler class for this.
Dann
ChemAxon abe887c64e
30-01-2012 15:56:36
Hi Dann,
Let me advise you two other ways to solve the problem:
If you have access to JChemManager GUI than it gives a simple way to unify the different forms of nitro groups following these steps http://www.chemaxon.com/jchem/doc/admin/#table_settings:
/>1. Start JChemManager
2. Select Table Options from File menu
3. On Table Options dialog: Select the proper table from Database table list, select Custom standardization, click on Open Standardizer Editor
4. On Configure standardization dialog: Add Transform nitro, Aromatize, Remove explicit Hydrogens (the last two are the default values of standardization; please be careful because Aromatize has 3 options: default is general)
5. Let the table be recalculated after OK on Table Options dialog.
By default the 'Transform nitro' action changes nonionic nitro group into the ionic form but if you prefer the other direction it can be inverted within the Configure standardization dialog.
An other kind of solution is the application of recalculateTable method as described here:
http://www.chemaxon.com/jchem/doc/dev/java/api/chemaxon/jchem/db/UpdateHandler.html#recalculateTable%28chemaxon.util.ConnectionHandler,%20java.lang.String,%20boolean,%20java.lang.String,%20java.util.Map,%20java.lang.Boolean,%20chemaxon.jchem.file.ProgressWriter%29
/>
Hope this helped
Best regards,
Krisztina
User eda6f877b4
31-01-2012 07:04:33
Hi Krisztina
Thanks for your reply, I will certainly investigate those options.
But as I see your solutions this is a task to be performed on the db as-is at the moment. Besides that I would like to ensure that future structure registrations and updates is also applied standardisation. That is the reason the the code I am writing.
Is the an example of fetching a structure from the db->performing standardisation->returning the strucuture to the db..?? (haven't been able to find one, only from a file)
BR
Dann
ChemAxon abe887c64e
31-01-2012 10:56:57
Hi Dann,
The execution of the custom standardization and recalculation on a table has three consequences:
- the structures being in the table at the moment will be standardized accordingly
- the structures being imported into the table in the future will be imported in the standardized form accordingly
- the query structures applied in future queries will be standardized accordingly
Find documentation here: http://www.chemaxon.com/jchem/doc/user/query_standard.html#standardizationDB
/>
Best regards
Krisztina
User eda6f877b4
31-01-2012 13:02:21
...aarrghh .. consequences..
I will have to consult the chemists having the actual issue. I can get jchemmanger to recalculate and add the new custom standardization file to the db..
Anyway thanks a lot
Dann