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:

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.


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.
  1. Declare a Prediction structure.
        struct Prediction prediction;
    
  2. 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
    
  3. Call InitPrediction
    	int initstatus = InitPrediction(&prediction);
    
  4. Read the MOL file
        FILE* ip = fopen(molfiles[p], "r");
        const char* cptr = readWholeFile(ip); 
        fclose(ip);
    
  5. 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.
  6. Call predict.
        int pstatus = predict(cptr, prediction, true, true, op);
    
    This will populate the Prediction structure. The results available are:
    1. 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.
    2. 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.
    3. X nucleus Shifts and Couplings
    4. 13C Shifts and Couplings.

Links: