Complete Calculation of Coherence Pathways - CCCP++



Some background and calculations are described in

A. Jerschow and R. Kumar, Calculation of Coherence Pathway Selection and Cogwheel Cycles,
J. Magn. Reson. 160, 59-64, (2003).
http://dx.doi.org/10.1016/S1090-7807(02)00031-9

Please cite this article when you use the program.

Quick Start

Compilation Issues

The compilation was tested on SuSe Linux 8.2 and MacOS 10.3 and 10.4. If you experience compilation problems you could try out the following binaries which were compiled on different Unix systems:
v. 1.0 compiled on Mandrake 8.0
v. 1.1 compiled on SuSe Linux 8.2
v. 1.2 compiled on OSX 10.4 (Tiger)
older src distributions:
CCCP++v1.1.tgz
CCCP++v1.0.tgz

If you get an error related to "parse.*" try the following: "make parse.cc", then "make".

The error " ‘yy_current_buffer’ was not declared in this scope " can be fixed by adding a line in the Makefile saying "USE_GMAKE=Yes" (fix reported for Fedora 8 OS and Ubuntu by Rangeet Bhattacharyya).

If you get an error related to "flex++" not found then you need to install the proper version of flex++ (available under the GNU license).

The program was written in ANSI C++ using the Standard Template Library. It is expected to compile without difficulties (using the supplied Makefile) on any GNU g++ compatible compiler of version 2.95 or higher. Some lower versions probably would work also, as well as c++ compilers as long as they are ANSI compliant. It has been compiled on Linux (Mandrake 8.2, i586), SGI (Irix 6.5, mips R12000). The parsing module was created using flex++ version 2.5.1 and 2.5.4, it is possible that these versions or later are required, although this could not be verified. (flex++ is available under the GNU license). The program itself including all source code is given away under the GNU General Public License, and is available for download at http://www.nyu.edu/projects/jerschow. If you get it to compile on other systems, please let me know, I can then update the information here.

Features

Invocation

CCCP++ < parameter_file_name.par

Parameter File Description

It will probably be easier to take an existing file and modify it to your needs, but here is some description:

Normal operation:

Cogwheel operation, to find a cogwheel cycle: Cogwheel cycle testing:

Note on Programming Style

Well, this program is written in C++ but does not use all the fancy features of encapsulation, inheritance, etc, mainly because I didn't quite know what classes to define for coherence pathways, etc, and whether that would actually be of any advantage. The main motivation for writing it in C++ were the availability of the vector and list classes in the STL which make life much easier. (well, there are also these nice little things like '<<', etc).