The default IDE for Siam Quantum is Code::Block. The project file is available in the source files directory. Below are maps of the source code.
Standard Execution
[sq.c] - main subroutine, greetings
|
+- 1) calls [option.c] - parse user inputs
+- 2) calls [mol.c] - builds 3D molecular structure in memory
+- 3) calls [basis.c] - prepares basis functions for the molecules
+- 4) calls [uhf.c] - solves for the wave function using Hartree-Fock
| |
| +- 4.1) calls [matrix.c] - compute various matrix elements
| | such as overlap, kinetic, nuclear,
| | and 2-electron integral
| +- 4.2) calls [lin.c] - front-end for LAPACK interface
| | for solving eigen equation or
| | an inverse of a matrix
| +- 4.3) calls [conv.c] - accelerate convergence using
| | methods like DIIS and damping
| +- 4.4) calls [check.c] - save the wave function and execution
| status into a checkpoint file
|
+- 5) calls [pop.c] - use the wave function (in the form of molecular
orbitals) to compute electric properties such as
electric field, potential, and Mulliken population
Optional Executions
[sq.c] - main subroutine
|
+- calls [mp2.c] - compute 2nd order Moller-Plesset perturbation energy
+- calls [optimize.c] - perform geometry optimization
+- calls [mecp.c] - compute minimum energy crossing point
+- calls [xsf.c] - save 3D volume information for visualization
Handling of Integrals
[matrix.c] - compute on-demand matrix elements
|
+- calls [int.c] - for simple integrals such as overlap, kinetic,
| | nuclei, and 2-electron integrals
| |
| +- calls [fgamma.c] - compute Boys’s F-gamma function
|
+- calls [grad.c] - compute gradients of 2-electron integral for geometry
| optimization or MECP calculation
+- calls [quartet.c] - the faster version of 2-electron integral which
| unrolls all the loops
+- calls [multipole.c] - the fastest but approximated version of 2-electron
integrals, used only the error is well below cut-off
value (1E-12)
Parallel Execution
Siam Quantum implements its own version of parallel execution without relying on standard platform such as MPI because we want the program to be very simple to install and because the calculations require very little data exchange so that parallelization is very easy to implement in this case.
Basically, when the parent process of Siam Quantum is executed, it prepares a text file for each child, and spawn the children with a specific option so that each child knows which text file it should read. The file contains a task along with necessary initial data. Then, the parent goes into an indefinite loop waiting for all the children to complete the tasks.
When each child completes its task, it writes output to a file with a specific name, the same filename that the parent is expecting to see.
[rpc.c] is the source code that handles parallelization. Currently, only three tasks are available. They are 1) computing Coulomb-Exchange matrix, 2) evaluating the MP2 energy, and 3) calculating the gradient of 2-electron integral for geometry optimization.