pymatgen.io.adf module
IO for ADF files.
- class AdfInput(task)[source]
Bases:
object
A basic ADF input file writer.
Initialization method.
- Parameters:
task (AdfTask) – An ADF task.
- class AdfKey(name, options=None, subkeys=None)[source]
Bases:
MSONable
The basic input unit for ADF. A key is a string of characters that does not contain a delimiter (blank, comma or equal sign). A key may have multiple subkeys and a set of options.
Initialization method.
- Parameters:
name (str) – The name of this key.
options (Sized) – The options for this key. Each element can be a primitive object or a tuple/list with two elements: the first is the name and the second is a primitive object.
subkeys (Sized) – The subkeys for this key.
- Raises:
ValueError – If elements in
subkeys
are notAdfKey
objects.
- add_option(option)[source]
Add a new option to this key.
- Parameters:
option (Sized or str or int or float) – A new option to add. This must have the same format with existing options.
- Raises:
TypeError – If the format of the given
option
is different.
- add_subkey(subkey)[source]
Add a new subkey to this key.
- Parameters:
subkey (AdfKey) – A new subkey.
Notes
Duplicate check will not be performed if this is an ‘Atoms’ block.
- block_keys = {'A1FIT', 'ANALYTICALFREQ', 'ATOMS', 'BASIS', 'CHARGE', 'EXACTDENSITY', 'GEOMETRY', 'INTEGRATION', 'OCCUPATIONS', 'RELATIVISTIC', 'SAVE', 'SCF', 'SYMMETRY', 'TITLE', 'TOTALENERGY', 'UNITS', 'UNRESTRICTED', 'XC', 'ZLMFIT'}[source]
- classmethod from_dict(d)[source]
Construct a MSONable AdfKey object from the JSON dict.
- Parameters:
d (dict) – A dict of saved attributes.
- Returns:
adfkey – An AdfKey object recovered from the JSON dict
d
.- Return type:
- static from_string(string)[source]
Construct an AdfKey object from the string.
- Parameters:
string (str) – A string.
- Returns:
adfkey – An AdfKey object recovered from the string.
- Return type:
- Raises:
ValueError – Currently nested subkeys are not supported. If
subend
was found a ValueError would be raised.
Notes
Only the first block key will be returned.
- has_option(option)[source]
Return True if the option is included in this key.
- Parameters:
option (str) – The option.
- Returns:
has – True if the option can be found. Otherwise False will be returned.
- Return type:
bool
- has_subkey(subkey)[source]
Return True if this AdfKey contains the given subkey.
- Parameters:
subkey (str or AdfKey) – A key name or an AdfKey object.
- Returns:
has – True if this key contains the given key. Otherwise False.
- Return type:
bool
- property key[source]
Return the name of this key. If this is a block key, the name will be converted to upper cases.
- remove_option(option)[source]
Remove an option.
- Parameters:
option (str or int) – The name (str) or index (int) of the option to remove.
- Raises:
TypeError – If the option has a wrong type.
- class AdfOutput(filename)[source]
Bases:
object
A basic ADF output file parser.
- is_internal_crash[source]
True if the job is terminated with internal crash. Please read ‘TAPE13’ of the ADF manual for more detail.
- Type:
bool
- run_type[source]
The RunType of this ADF job. Possible options are: ‘SinglePoint’, ‘GeometryOptimization’, ‘AnalyticalFreq’ and ‘NUmericalFreq’.
- Type:
str
Initialization method.
- Parameters:
filename (str) – The ADF output file to parse.
- exception AdfOutputError[source]
Bases:
Exception
The default error class for errors raised by
AdfOutput
.
- class AdfTask(operation='energy', basis_set=None, xc=None, title='ADF_RUN', units=None, geo_subkeys=None, scf=None, other_directives=None)[source]
Bases:
MSONable
Basic task for ADF. All settings in this class are independent of molecules.
Notes
Unlike other quantum chemistry packages (NWChem, Gaussian, …), ADF does not support calculating force/gradient.
Initialization method.
- Parameters:
operation (str) – The target operation.
basis_set (AdfKey) – The basis set definitions for this task. Defaults to ‘DZ/Large’.
xc (AdfKey) – The exchange-correlation functionals. Defaults to PBE.
title (str) – The title of this ADF task.
units (AdfKey) – The units. Defaults to Angstroms/Degree.
geo_subkeys (Sized) – The subkeys for the block key ‘GEOMETRY’.
scf (AdfKey) – The scf options.
other_directives (Sized) – User-defined directives.
- classmethod from_dict(d)[source]
Construct a MSONable AdfTask object from the JSON dict.
- Parameters:
d (dict) – A dict of saved attributes.
- Returns:
task – An AdfTask object recovered from the JSON dict
d
.- Return type:
- operations = {'energy': 'Evaluate the single point energy.', 'freq': 'Same as frequencies.', 'frequencies': 'Compute second derivatives and print out an analysis of molecular vibrations.', 'numerical_frequencies': 'Compute molecular frequencies using numerical method.', 'optimize': 'Minimize the energy by varying the molecular structure.'}[source]