Modgraph Consultants Limited.
NMRPredict for Applications.
This page was last updated on 24 Aug 2009
NMRPredict Desktop. NMRServer Integration using the DLL/lib.
NMRServer offers a number of methods of integration. This page dscribes how to integrate NMRPredict Desktop, that is, using the DLL/lib distribution.
The main features of NMRPredict Desktop are:
- Simultaneous predictions of 1H, a single X nucleus and 13C.
- 1H prediction using two methods (Increment and Conformer) and automatic select of the best result.
- 13C prediction using Neural Network only; this avoids the installation of large databases (which would be necessary nfor HOSE prediction.
- Users can construct their own databases for 1H and 13C. These databases can be used by NMRServer and NMRPredict Desktop.
- X nucleus is one of 15N, 11B, 17O, 19F, 29Si
NMRPredict Desktop is distributed with a sample application. This application demonstrates how to retrieve all the available information, such as coupling constants, spectra for each conformer etc. In practice implementors may just want to retrieve an overview of the results, allowing only more expert users access to the details.
The Sample Application
When you untar/zip the supplied file, it will create several folders.
- bin -
- nmrccssldll - the example applcation
- multi_results.txt - the output file produced by the above.
- PARAM8.DAT AUTOCF.TXT GSEF1.DAT GSEF2.DAT - charge (ie conformer proton prediction) data files
- CSEARCHH.TOC - proton prediction data file
- upstream2 - increment proton prediction executable.
- resources2/ - a folder containing about 50 files.
- gmmx03 - gmmx03 executable.
- mm2test.prm edta.prm mm3.prm mmff94.prm mmxconst.prm oplsaa.prm charmm.prm amber.prm water.prm - data files for gmmx03
- mclicenseinfo - license information application
Additionally for Windows - nmrccssbl.dll pthreadGC2.dll libdt_smiles.dll
- csearchdb2none - dummy 13C database.
- csearchdb2nz - empty user 13C database
- include - include files
- lib -libraries libcharge8.a libcsearchv2.a libcsourcev2.a libdt_smiles.a libnmrccssbl.a libupstream2.a libgmmx03.a liblm_partner.a
- license - license file
- nmrusdatabase - empty user 1H database.
- src - example app source code, 'nmrccssdll.cpp
- tmp - temporary files.
The sample applcation file is written in c++, but implementor may also use c; 'nmrccssdll.cpp'. It provides two function which may be copied wholesale into the applcation.
int molfilehasproblem(const char* molstr, vector& vmolcorr, int &molistatus, FILE* op)
int predict(const char* molstr, Prediction& prediction, bool h3d, bool bc13, FILE* op)
- Declare a Prediction structure.
struct Prediction prediction;
- Set up the folders.
#ifndef WINDOWS
prediction.m_nmrsoapdirw = L"/home/mike/nmrpredict/src-40601/reldlll/bin";
prediction.m_csearchdir1w = L"/home/mike/nmrpredict/src-40601/reldlll/csearchdb2none";
prediction.m_csearchdir2w = L"/home/mike/nmrpredict/src-40601/reldlll/csearchdb2nz";
prediction.m_nmrtempdirw = L"/home/mike/nmrpredict/src-40601/reldlll/tmp";
prediction.m_usdatabasedirw = L"/home/mike/nmrpredict/src-40601/reldlll/nmrusdatabase";
prediction.m_dylicensedirw = L"/home/mike/nmrpredict/src-40601/reldlll/license/";
prediction.m_nmrlicensefilew = 0;
#else
prediction.m_nmrsoapdirw = L"D:\\msys\\home\\mike\\nmrwindows\\reldlll\\bin";
prediction.m_csearchdir1w = L"D:\\msys\\home\\mike\\nmrwindows\\reldlll\\csearchdb2none";
prediction.m_csearchdir2w = L"D:\\msys\\home\\mike\\nmrwindows\\reldlll\\csearchdb2nz";
prediction.m_csearchdir2w = L"D:\\msys\\home\\mike\\nmrwindows\\reldlll\\csearchdb2userdb";
prediction.m_nmrtempdirw = L"D:\\msys\\home\\mike\\nmrwindows\\reldlll\\tmp";
prediction.m_usdatabasedirw = L"D:\\msys\\home\\mike\\nmrwindows\\reldlll\\nmrusdatabase";
prediction.m_dylicensedirw = L"D:\\msys\\home\\mike\\nmrwindows\\reldlll\license";
prediction.m_nmrlicensefilew = 0;
#endif
- Call InitPrediction
int initstatus = InitPrediction(&prediction);
- Read the MOL file
FILE* ip = fopen(molfiles[p], "r");
const char* cptr = readWholeFile(ip);
fclose(ip);
- call 'molfilehasproblem'
int istatus = molfilehasproblem(cptr, vmolcorrected, molistatus, op);
this will correct any problems with the MOL files making a successful prediction more likely. The most important correction made is rescaling the MOL coordinates to be approximately Angström space.
- Call predict.
int pstatus = predict(cptr, prediction, true, true, op);
This will populate the Prediction structure. The results available are:
- 1H Conformer Info. energy, population, ignored (some conformer with very high energy are not predicted because they would make no contribution to to the weighted average.
- 1H Shifts and Couplings. This includes the 'Best' shift values - which is automatically chosen from the Increment and Conformer methods. The default spectrum returned is the weighted average of the conformers produced.
- X nucleus Shifts and Couplings
- 13C Shifts and Couplings.
Links: