← Back: Mathematical works


Description of cubetransport

cubetransport is a software by myself which computes the optimal transportation distance between two electronic densities given as .cube files sharing the same grid.


Here are the source codes.

How to compile

This program is written in C language, using the ISO/CEI 9899:1999 standard (option -std=c99 with GCC). The mathematical library has to be linked (option -lm with GCC). So, after having decompressed the files in some (previously empty) working directory, on a UNIX system equipped with GCC, enter in command-line:
gcc -std=c99 *.c -lm -o cubetransport

User's instructions

The syntax for use is:
./cubetransport file1.cube file2.cube [-m=MODE] [-p=PRECISION] [-l=LOGFILE]
where file1.cube and file2.cube are the (access paths to) .cube files, LOGFILE is the chosen log file name, and:


cubetransport comes with a small utility program called metacube. metacube takes a .cube file with high precision and transforms it into a new .cube file with a coarser grid. This is useful because .cube files normally describe punctual densities, while cubetransport is devised to work with volumic densities; and the best way to get precise volumic data is to start from high-precision punctual data. (Note however that in any case, cubetransport automatically applies [virtually] metacube with the defaults parameters before starting computations).

Here are the source codes for metacube. You compile metacube in the same way as transcube.

The syntax for use is:
./metacube [-p] [-v] [-k=K] input.cube [-o=output.cube] -w
where input.cube is the input file name, and: