libcmatrix
is a helper library for efficient simulation of problems in solid-state nuclear magnetic resonance, particularly problems involving several dipolar-coupled spins, as commonly encountered in molecular organic systems. Although it can be used to write standalone programs, it has evolved into a support library for pNMRsim, which provides a user-friendly SIMPSON-like interface to the underlying machinery.
Note on language style: libcmatrix
was developing at a period (early 2000s) when C++ was at a relatively youthful stage. The Standard Template Library was just becoming standardised, and there were no matrix / vector libraries that were both flexibile and relatively efficient. Hence it developed around a hand-rolled complex matrix type (cmatrix
) and its own vector type (List
). Started as a new project, a lot of features of modern C++ (e.g. move semantics from C++11 onwards) would avoid the need for such hand-rolled code. But given that the code does its job, and is working in the background, there has been little incentive to "modernise" the code, beyond ensuring that it continues to compile with current compilers.