ampsci input: descriptions of file format and available options
[Home]
basic usage
The program is run with input options from the command line.
Main method: input options from a text file
./ampsci filename
- Runs ampsci with input option specified in file "filename"
- See below for full description of input format, and a detailed list of input options + descriptions.
- run
./ampsci -h
to get breif instructions for input options
- Several example input files are given in: doc/examples/, along with their expected output; use these to test if everything is working.
The Output is printed to screen. It's recommended to forward this to a text file. The input options and the ampsci version details are also printed, so that the program output contains all required info to exactly reproduce it. e.g.,
./ampsci input |tee -a outout
- Runs ampsci using input options in file "input".
- Output will both be written to screen, and appended to file "output".
Command-line options
- run
./ampsci -h
to get breif instructions for input options
<filename>
Runs ampsci taking options specified in file "filename" (eg, ./ampsci filename).
See documentation (or option -a) for input file format options.
Example:
./ampsci input.in
-Runs ampsci taking input options from file 'input.in'
<At> <Core> <Valence>
For quick and simple HF calculation.
If core is not given, guesses core configuration and runs using V^N approximation.
Examples:
./ampsci Cs
- Runs ampsci for Cs using Hartree Fock (V^N) approximation
./ampsci Cs [Xe] 6sd5d
- Runs ampsci for Cs using Hartree Fock with Xe-like core and
valence states up to n=6 for s,p-states and n=5 for d-states
-v (--version)
Prints ampsci version (and git commit) details
-h (--help, -?)
Print help info, including some detail on input options
-a <BlockName> (--ampsci)
Prints list of available top-level ampsci options. BlockName is optional;
if given it will print options for given ampsci Block. You may list any number of blocks (space separated)
Example:
./ampsci -a Atom HartreeFock
-m <ModuleName> (--modules)
Prints list of available Modules. ModuleName is optional; if given, will list avaiable options for that Module
Example:
./ampsci -m MatrixElements
-o <OperatorName> (--operators)
Prints list of available operators. OperatorName is optional; if given,
will list avaiable options for that operator (most operators take no options).
Example:
./ampsci -o E1
-p <Atom> <Isotope> (--periodicTable)
Prints textual periodic table with electronic + nuclear information.
Atom and Isotope are optional; if given, will print info for that isotope.
Atom should be atomic symbol (eg Cs), or Z (55).
If Isotope is blank, will print for 'default' isotope.
Can also list 'all' known isotope info
Examples:
./ampsci -p Cs
./ampsci -p Cs 131
./ampsci -p Cs all
-c (--constants)
Prints some handy physical constants
Input file format
Input is a plain text file that consists of sets of 'Blocks' and 'Options'.
- Blocks are followed by curly-braces: BlockName{}
- Options are followed by a semi-colon: OptionName = option_value;
- Generally, each Block will have a set of Options that may be set
- Nearly all are optional - leave them blank and a default value will be used
- Blocks may be nested inside other Blocks
- White-space is ignored, as are ' and " characters
- You may use C++-style line '//' and block '/**/' comments
The code is "self-documenting". At any level (i.e., in any Block or at 'global' level outside of any Block), set the option 'help;', and the code will print:
- a list of all available Blocks and Options at that level
- a description of what they are for, and
- the default value if they are left unset.
For example, setting 'help' at the top-level will print a list of all available top-level Blocks:
ampsci{
Atom{}
Nucleus{}
HartreeFock{}
RadPot{}
ExtraPotential{}
Basis{}
Correlations{}
Spectrum{}
}
Holds grid, including type + Jacobian (dr/du)
Definition: Grid.hpp:31
Functions and classes for Configuration Interaction calculations.
Definition: CI.hpp:6
Modules are run using calculated atomic wavefunctions.
Definition: Module_Kionisation.cpp:44
You can get the same output by running ./ampsci -a
Set help;
inside any of these to get full set of options of each of these, and so on. Full descriptions of each Block/Option are given in doc/ - but the self-documentation of the code will always be more up-to-date.
You can get the same output by running ./ampsci -a BlockName
. For example, ./ampsci -a Basis
will print all available 'Basis' options
The general usage of the code is to first use the main blocks to construct the atomic wavefunction and basis states, then to add as many 'Module::' blocks as required. Each module is a seperate routine that will take the calculated wavefunction and compute any desired property (e.g., matrix elements). The code is designed such that anyone can write a new Module (See doc/writing_modules.md)
e.g., To calculate Cs wavefunctions at HF level with 6s, 6p, and 5d valence states, and then calculate E1 matrix elements including core polarisation (RPA):
Atom {
Z = Cs;
}
Nucleus { }
HartreeFock {
core = [Xe];
valence = 6sp5d;
}
operator = E1;
rpa = true;
}
double A(double Z, int l=0)
Al(Z) fitting function [PRA 93, 052509 (2016)].
Definition: FGRadPot.cpp:121
void matrixElements(const IO::InputBlock &input, const Wavefunction &wf)
Calculates matrix elements of any tensor operator, with RPA.
Definition: matrixElements.cpp:30
Auto-documentation
- This document may go out-of-sync with the code
- The best fail-safe way to check the available options for a given input block is to use the code itself.
- Do this by adding a blank 'help' option to the input file:
- The code will then print a list of all available options, and (usually) an explanation for them
blockname { help; }
You can also access most of the self-documenation directly from the command-line:
./ampsci -h
- Print help info, including input options (same as –help, -?)
./ampsci -m <ModuleName>
- Prints list of available Modules (same as –modules)
- ModuleName is optional. If given, will list avaiable options for that Module
./ampsci -o <OperatorName>
- Prints list of available operators (same as –operators)
- OperatorName is optional. If given, will list avaiable options for Operator
./ampsci -a <BlockName>
- Prints list of available top-level ampsci options (same as –ampsci)
- BlockName is optional; if given will print options for given ampsci Block
- e.g.,
./ampsci -a Basis
will print all available 'Basis' options
Modules
- The modules system allows the easy calculation of any atomic properties after the wavefunction has been calculated.
- Any number of modules can be run by adding a ‘Module::moduleName{}’ block.
- Get a list of available modules:
./ampsci -m
./ampsci -m <ModuleName>
- Prints list of available Modules (same as –modules)
- ModuleName is optional. If given, will list avaiable options for that Module
- See doc/modules.md for full details
- The code is designed so that you can easily create your own modules. See doc/writing_modules.md for details
Details for each input block
- Basic details for each input block are given here.
- It's generally better to get this info from the code (by setting the
help;
option in any given block), since that will always be up-to-date, while this document may fall out-of-date
- You can also get this directly from the command-line:
./ampsci -a <BlockName>
- Prints list of available top-level ampsci options (same as –ampsci)
- BlockName is optional; if given will print options for given ampsci Block
- e.g.,
./ampsci -a Basis
will print all available 'Basis' options
Atom
Available Atom options/blocks are:
Atom{
Z;
varAlpha2;
run_label;
}
HartreeFock
HartreeFock{
core;
valence;
eps;
method;
Breit;
}
Nucleus
Nucleus{
rrms;
t;
type;
}
constexpr double c
speed of light in a.u. (=1/alpha)
Definition: PhysConst_constants.hpp:17
Grid
r0;
rmax;
num_points;
type;
b;
du;
}
ExtraPotential (read from text file)
ExtraPotential{
filename;
r_cut;
}
void scale(std::vector< T > *vec, T x)
In-place scalar multiplication of std::vector - types must match.
Definition: Vector.hpp:209
- Reads in extra potential from text file (space separated: 'x y' format):
- Interpolates these points onto the grid (but does NOT extrapolate, potential is assumed to be zero outside the given range)
- Potential is multiplied by 'factor'
- May be added before or after HF (if before: added to vnuc, if after: to vdir)
RadPot (Ginges/Flambaum QED Radiative Potential)
RadPot{
Ueh;
SE_h;
SE_l;
SE_m;
WK;
rcut;
scale_rN;
scale_l;
}
- Adds QED radiative potential to Hamiltonian.
- QED will be included if this block is present; else not
- Will read from file if it exists (e.g., Z_uhlmw.qed)
- Each factor (Ueh, SE_h,..) is a scale; 0 means don't include. 1 means include full potential. Any positive number is valid.
- rcut: Only calculates potential for r < rcut [for speed; rcut in au]
- scale_rN: finite nucleus effects: rN = rN * scale_rN (=0 means pointlike)
- scale_l: Optional input: Scaling factors for the V_rad for each l state; for higher states, uses the last given input. Input as a list of real numbers. Best explained with examples:
- scale_l = 1; // include QED for all states
- scale_l = 0,1,0; //include QED for p states only
- scale_l = 0,1; //inlcude QED for p,d,f.. but not s states.
- don't need to be 1 or 0, can be any real number.
- core_qed: if true, will include QED effects into core in Hartree-Fock (relaxation). If false, will include QED only for valence states
Basis (B-spline basis for MBPT)
- The 'basis' is used for summing over states in MBPT. (A second 'basis', called spectrum, may be used for summation over states in other problems)
Basis{
number;
order;
r0;
r0_eps;
rmax;
states;
orthogonalise;
positron;
type;
}
void print()
Prints 'man page' style info.
Definition: ampsci.cpp:121
- Constructs basis using number splines of order order
- on sub-grid (r0,rmax) [if zero, will use full grid]
- r0_eps: Only calculate splines for r where relative core density is larger than r0_eps (updates r0 for each l). Typically ~1.0e-8. Set to zero to use r0.
- If print = true, will print basis energies
- positron: include negative energy states into basis
- states: which basis states to store
- e.g., "7sp5df" will store s and p states up to n=7, and d and f up to n=5
- spd will store all (number) states for l<=2
Correlations (Correlation potential, Sigma)
- For including correlations. 'basis' must exist to calculate Sigma, but not to read Sigma in from file.
Correlations{
n_min_core;
each_valence;
fitTo_cm;
lambda_kappa;
read;
write;
rmin;
rmax;
stride;
ek{}
allOrder;
Feynman;
fk;
eta;
screening;
holeParticle;
lmax;
real_omega;
imag_omega;
include_G;
}
- Includes correlation corrections. note: splines must exist already
- read/write: Read/write from/to file. Set to 'false' to calculate from scratch (and not write to file). By default, the file name is: "Atom".sig.
- Alternatively, put any text here to be a custom filename (e.g., read/write="Cs_new"; will read/write from/to Cs_new.sig). Don't include the '.sig' extension (uses sigf for Feynman method, sig2 for Goldstone). Grids must match exactly when reading in from a file.
- If reading Sigma in from file, basis doesn't need to exist
- n_min_core: minimum core n included in the Sigma calculation; lowest states often contribute little, so this speeds up the calculations
- stride: Only calculates Sigma every nth point (Sigma is NxN matrix, so stride=4 leads to ~16x speed-up vs 1)
- rmin/rmax: min/max points along radial Grid Sigma is calculated+stored.
- lambda_kappa: Rescale Sigma -> lambda*Sigma. One lambda for each kappa. If not given, assumed to be 1.
- Note: Lambda's are not written/read to file, so these must be given (if required) even when reading Sigma from disk
- fk: Effective screening factors; only used for 2nd-order Goldstone method
- Note: Included directly into Sigma
- e.g., for Cs: fk = 0.72, 0.62, 0.83, 0.89, 0.94, 1.0;
- If blank, will calculate these from scratch for each state (better, slower)
- fitTo_cm: Provide list of energies (lowest valence states for each kappa); Sigma for each kappa will be automatically re-scaled to exactly reproduce these. Give as binding energies in inverse cm! It will print the lambda_kappa's that it calculated
- e.g., fitTo_cm = -31406.5, -20228.2, -19674.1; will fit for the lowest s & p states for Cs
- Will over-write lambda_kappa
- -43487.11, -28583.45, -28583.11, -12204.03, -12203.99, -6856.91, -6856.91; // Li
- -41449.45, -24493.28, -24476.08, -12276.56, -12276.61, -6862.53, -6862.53; // Na
- -35009.81, -22024.63, -21966.92, -13472.83, -13475.13, -6881.96, -6881.96; // K
- -33690.81, -21111.86, -20874.265, -14335.161, -14335.607, -6898.692, -6898.718; // Rb
- -31406.468, -20228.200, -19674.161, -16907.211, -16809.625, -6934.241, -6934.422; // Cs
- -80686.30, -60424.74, -58733.90, -75812.45, -75011.49, -32427.68, -32202.97; // Ba+
- -32848.87, -20611.46, -18924.87, -16619.00, -16419.23; // Fr
- -81842.5 -60491.2, -55633.6, -69758.2, -68099.5, -32854.6, -32570.4; // Ra+
Spectrum (B-spline basis for MBPT)
- The 'Spectrum' is similar to basis, but also includes correlation corrections (if Sigma exists)
- Useful, since we often need a small basis to compute MBPT terms, but a large basis to complete other sum-over-states calculations.
Spectrum{
number;
order;
r0;
r0_eps;
rmax;
states;
orthogonalise;
positron;
type;
}
CI
ci_basis;
J;
J+;
J-;
num_solutions;
sigma1;
sigma2;
cis2_basis;
s1_basis;
s2_basis;
n_min_core;
max_k;
qk_file;
sk_file;
exclude_wrong_parity_box;
sort_output;
parallel_ci;
}