GRASP
General Relativistic Atomic Structure Package

[![][manual-badge]][manual-pdf]

The General Relativistic Atomic Structure Package (GRASP) is a set of Fortran 90 programs for performing fully-relativistic electron structure calculations of atoms.

Installation

Please note: The installation instructions here are for the development version on the master branch.

To install the latest published release (2018-12-03), go to the "Releases" page, download the tarball from there and refer to the instructions in the README in the tarball.

To compile and install GRASP, first clone this Git repository:

1 git clone https://github.com/compas/grasp.git

There are two ways to build GRASP: either via CMake or via the Makefiles in the source tree. Either works and you end up with the GRASP binaries in the bin/ directory.

CMake is the recommended way to build GRASP. The Makefile-based workflow is still there to make smoother to transition from Makefiles to a modern build system.

CMake-based build

The first step with CMake is to create a separate out-of-source build directory. The configure.sh script can do that for you:

1 cd grasp/ && ./configure.sh

This will create a build/ directory with the default Release build configuration. However, configure.sh is just a simple wrapper around a cmake call and if you need more control over the build, you can always invoke cmake yourself (see CMake documentation for more information).

To then compile GRASP, you need to go into the out-of-source build directory and simply call make:

1 cd build/ && make install

Remarks:

Makefile-based build

The legacy Makefile-based build can be performed by simply calling the make in the top level directory:

1 make

In this case, the compilation of each of the libraries and programs happens in their respective directory under src/ and the build artifacts are stored in the source tree. The resulting binaries and libraries will directly get installed under the bin/ and lib/ directories.

To build a specific library or binary you can pass the path to the source directory as the Make target:

1 # build libmod
2 make src/lib/libmod
3 # build the rci_mpi binary
4 make src/appl/rci90_mpi

Note that any necessary library dependencies will also get built automatically.

WARNING: the Makefiles do not know about the dependencies between the source files, so parallel builds (i.e. calling make with the -j option) does not work.

Customizing the build

By default the Makefile is designed to use gfortran. The variables affecting GRASP builds are defined and documented at the beginning of the Makefile.

For the user it should never be necessary to modify the Makefile itself. Rather, a Make.user file can be create next to the main Makefile where the build variables can be overridden. E.g. to use the Intel Fortran compiler instead, you may want to create the following Make.user file:

1 export FC = ifort
2 export FC_FLAGS = -O2 -save
3 export FC_LD = -mkl=sequential
4 export FC_MPI = mpiifort

As another example, to set up a linker search path for the BLAS or LAPACK libraries, you can set up Make.user as follows:

1 export FC_LD = -L /path/to/blas

About GRASP

This version of GRASP is a major revision of the previous GRASP2K package by [P. Jonsson, G. Gaigalas, J. Bieron, C. Froese Fischer, and I.P. Grant Computer Physics Communication, 184, 2197 - 2203 (2013)][grasp2k-2013] written in FORTRAN 77 style with COMMON and using Cray pointers for memory management. The present version is a FORTRAN95 translation using standard FORTRAN for memory management. In addition, COMMONS have been replaced with MODULES, with some COMMONS merged. Some algorithms have been changed to improve performance for large cases and efficiently.

The previous package, was an extension and modification of GRASP92 by Farid Parpia, Charlotte Froese Fischer, and Ian Grant. Computer Physics Communication, 94, 249-271 (1996)

Development of this package was performed largely by:

Please contact one of these authors if you have questions

Supporters include:

Computer Physics Communications publication on this version of GRASP:

C. Froese Fischer, G. Gaigalas, P. Jönsson, J. Bieroń, "GRASP2018 - a Fortran 95 version of the General Relativistic Atomic Structure Package", Computer Physics Communications, 2018, https://doi.org/10.1016/j.cpc.2018.10.032

Structure of the Package

The package has the structure shown below where executables, after successful compilation, reside in the bin directory. Compiled libraries are in the lib directory. Scripts for example runs and case studies are in folders under grasptest. Source code is in the src directory and divided into applications in the appl directory, libraries in the lib directory and tools in the tool directory.

1 |-bin
2 |-grasptest
3 |---case1
4 |-----script
5 |---case1_mpi
6 |-----script
7 |-----tmp_mpi
8 |---case2
9 |-----script
10 |---case2_mpi
11 |-----script
12 |-----tmp_mpi
13 |---case3
14 |-----script
15 |---example1
16 |-----script
17 |---example2
18 |-----script
19 |---example3
20 |-----script
21 |---example4
22 |-----script
23 |-------tmp_mpi
24 |---example5
25 |-----script
26 |-lib
27 |-src
28 |---appl
29 |-----HF
30 |-----jj2lsj90
31 |-----jjgen90
32 |-----rangular90
33 |-----rangular90_mpi
34 |-----rbiotransform90
35 |-----rbiotransform90_mpi
36 |-----rci90
37 |-----rci90_mpi
38 |-----rcsfgenerate90
39 |-----rcsfinteract90
40 |-----rcsfzerofirst90
41 |-----rhfs90
42 |-----rmcdhf90
43 |-----rmcdhf90_mpi
44 |-----rnucleus90
45 |-----rtransition90
46 |-----rtransition90_mpi
47 |-----rwfnestimate90
48 |-----sms90
49 |---lib
50 |-----lib9290
51 |-----libdvd90
52 |-----libmcp90
53 |-----libmod
54 |-----librang90
55 |-----mpi90
56 |---tool

Program Guide and Compilation

The software is distributed with a practical guide to GRASP2018 in PDF-format. The guide, which is under Creative Commons Attribution 4.0 International (CC BY 4.0) license, contains full information on how to compile and install the package.

Acknowledgements

This work was supported by the Chemical Sciences, Geosciences and Biosciences Division, Office of Basic Energy Sciences, Office of Science, U.S. Department of Energy who made the Pacific Sierra translator available and the National Institute of Standards and Technology. Computer resources were made available by Compute Canada. CFF had research support from the Canadian NSERC Discovery Grant 2017-03851. JB acknowledges financial support of the European Regional Development Fund in the framework of the Polish Innovation Economy Operational Program (Contract No. POIG.02.01.00-12-023/08).

License

The code in this repository is distributed under the MIT license. The associated manual "A practical guide to GRASP2018" is distributed under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.