Function adas.write_adf34

def write_adf34(file=None, fulldata=None, comments=None)

Write an adf34 Cowan code (adas8#2) driver file from a user supplied fulldata dictionary.

Parameters

file : str
full name of adf34 file.
fulldata : dict
contents of the adf34 file
    'file'    : adf34 filename
    'iz0'     : int array of atomic numbers
    'iz1'     : int array of ion charge (neutral=1)
    'itpow'   : int RCN control parameter
    'iptvu'   : int
    'ipteb'   : int
    'norbpt'  : int
    'izhxbw'  : int
    'iphfwf'  : int
    'ihf'     : int
    'ibb'     : int
    'tolstb'  : float
    'tolkm2'  : float
    'tolend'  : float
    'thresh'  : float
    'kutd'    : int
    'kut1'    : int
    'ivinti'  : int
    'irel'    : int
    'maxit'   : int
    'npr'     : int
    'exf10'   : float
    'exfm1'   : float
    'emx'     : float
    'corrf'   : float
    'iw6'     : int
    'label'   : array of arbitrary configuration labels
    'config'  : array of configurations in Cowan format
comments : list, optional
comments for the end of the file as a list of strings.

Notes

References

ADAS manual description of adf34: http://www.adas.ac.uk/man/appxa-34.pdf

The repository for Robert D. Cowan's atomic structure codes, with full documentation of the RCN options is here: https://www.tcd.ie/Physics/research/groups/xray-spectroscopy/cowan/

Version History

  • Martin O'Mullane, 14-08-2022

    • First version
  • Martin O'Mullane, 13-03-2023

    • Fix the too short space between the label and configuration.
  • Martin O'Mullane, 09-05-2023

    • Ensure the strict column positioning of the configuration definition.

Example

Round trip of W45+ driver file.

>>> import adas as adas
>>> file='/home/adas/adas/adf34/heavy_species/tungsten/w45.dat'
>>> fulldata = adas.xxdata_34(file)
>>> my_comments=['C Testing write_adf34', 'C By me, today']
>>> my_file='/tmp/test_write_adf34.dat'
>>> adas.write_adf34(file=my_file, fulldata=fulldata, comments=my_comments)