Function adas.adf04_to_driver
def adf04_to_driver(adf04=None, start_shell=1, adf34=None, inst_file=None, pp_file=None, adf04_name='new_adf04.dat', coupling='ICR', adf27=None, adf54=None, ndlev=4500, ndtrn=150000)
-
Take an adf04 file and produce a driver files for Cowan code (adas8#1), ie adf34/inst/pp files or AUTOSTRUCTURE (adas7#1), ie adf27.
Parameters
adf04
:str
- full name of ADAS adf04
start_shell
:int
- index of first orbital in drive (1s=1, 2s=2 etc.)
adf34
:str
- full name of output adf34 driver file
inst_file
:str
- full name of adas8#1 instruction file (rnc2 step)
pp_file
:str
- full name of adas8#1 post-processor file
coupling
:str
- coupling for calculation for adas7#1 : LS, IC, ICR, CA, CAR for adas8#1 : LS, IC
adf04_name
:str
- name of adf04 file used in pp_file
adf27
:str
- full name of output adf27 driver file
adf54
:str
- full name of adf54 scaling file which, if provided, adds the Slater scalings to adf27 driver output
ndlev
:int
, optional- maximum number of levels in adf04 file - defaults is 4500
ndtrn
:int
, optional- maximum number of transitions in adf04 file - default is 150000
Returns
nothing - the output is a file,
orfiles, written to disk
Notes
Pure python code but calls adas8#1 and compiled routines which are dependent on fortran and a full ADAS installation.
Three files are required to run adas8#1 (Cowan code) but it is only possible to produce the adf34 file unambiguously.
The coupling defaults to ICR which is shortened to IC for adas8#1 files.
References
ADAS manual description of adf34: http://www.adas.ac.uk/man/appxa-34.pdf and NIST documentation: https://doi.org/10.18434/T4/1502500 Description of adf27: http://apap-network.org/autos/ver/WRITEUP
Version History
-
Martin O'Mullane, 03-08-2022
- First version
-
Martin O'Mullane, 22-08-2023
- Fix logic to not make adas8#1 files when just adf27 is chosen.
- Make maxe an integer to avoid issues with gfortran reading namelists in autostructure.
- Extend coupling choices to CA(R) for adas7#1.
- If an optional adf54 is supplied add Slater scaling parameters to adf27.
Example
Generate the afd34 and adf27 driver files for C3+.
>>> import adas as adas >>> file = '/home/adas/adas/adf04/adas#6/mom97_ls#c3.dat' >>> adas.adf04_to_driver(adf04=file, adf34='/tmp/c3_adf32.dat', adf27='/tmp/c3_adf27.dat')