An NMR simulation tool optimised for dense dipolar coupled networks
For pre-compiled binaries (strongly recommended), do refer to the this webpage. The links in this page are sadly broken, but a zip file containing all the files can be downloaded from this page.
This repository is the bleeding edge source code, currently a maintenance version of V18.05.13.
pNMRsim is a SIMPSON-like simulation program which is suited to the simulation of extended systems of spin-1/2 nuclei - the p refers to the use of 'periodic' geometries to introduce additional symmetry and block diagonalisation. pNMRsim tries hard to only recalculate quantities when strictly necessary, and historically at least will generally be faster than the equivalent SIMPSON simulation, but this added complexity does increase the chances of bugs surfacing in odd situations. In short, use at your own risk and always check that initial results make sense before relying on the output.
pNMRsim is dependent on the following components:
A moderatately up-to-date C++ compiler (supporting C++11). The code is only tested only GCC compilers under Linux, and some tweaks may be required for other compilers / run-times.
The libcmatrix NMR library. pNMRsim is in effect a "user interface" to these underlying library routines. The library is updated as required by pNMRsim and so it is advisable to compile an up-to-date of the library when compiling pNMRsim.
The Minuit library (in its C++ incarnation) is required for optimisation problems. It is not required, however, for data fitting which uses libcmatrix routines. The "version 2" form of the C++ Minuit library is recommended as more up to date, but it must be a stand-alone version rather than one integrated into ROOT (see the README for libcmatrix).
The "classic" version of the Boost Spirit library is used for parsing. You will need a standalone version, 1.8.5, not the later versions of Spirit that are currently supplied with Boost.
SIMPLOT is useful for visualising pNMRsim output (although a variety of output formats are supported).
It is most efficient to compile libcmatrix and pNMRsim one after the other since the same configuration options are involved.
The options to configure are:
--with-atlas, --with-acml, --with-mkl, --with-openblas enable use of one of the ATLAS, ACML, MKL or OpenBLAS libraries
--with-MPI enable the use of MPI for parallel computations
--with-minuit enable the use of Minuit
--with-sse enable the use of SSE3 instructions for complex arithmetic
See the installation instructions for libcmatrix for more details.
--enable-static Use static linkage (default off). This is recommended when compiling for Windows. It will generate stand-alone (but rather large) .exe files.
-
Ensure
libcmatrixis compiled and (optionally) installed. -
Configure pNMRsim as above, making sure that
configurecan find thelibcmatrixheader files and library (CPPFLAGSandLDFLAGSrespectively - again thelibcmatrixINSTALL instructions discuss this). You will need to add the path to the Spirit files by adding-I<Spirit directory (containing boost/spirit)>.
Hence a minimal configure run will typically be
CPPFLAGS="-I../spirit-1.8.5-miniboost-patched -I<basedir>/libcmatrix/include" LDFLAGS="-L<basedir>/libcmatrix/lib" ./configure
Note that absolute paths should be used rather than relative ones so that the paths are transferable.
makewill compile pNMRsim, pNMRproc and extras/magres2pNMRsim.
The test directory contains a varied and rather chaotic collection of input files. Many have been hacked around for testing purposes so check that the input file actually does what suggests it does...