pymatgen.io.adf module¶
-
class
AdfInput(task)[source]¶ Bases:
objectA basic ADF input file writer.
Initialization method.
Parameters: task (AdfTask) – An ADF task.
-
class
AdfKey(name, options=None, subkeys=None)[source]¶ Bases:
monty.json.MSONableThe 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 insubkeysare notAdfKeyobjects.-
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 exsiting options. Raises: TypeError– If the format of the givenoptionis 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= {'CHARGE', 'RELATIVISTIC', 'ZLMFIT', 'GEOMETRY', 'EXACTDENSITY', 'OCCUPATIONS', 'ATOMS', 'BASIS', 'SAVE', 'A1FIT', 'TOTALENERGY', 'TITLE', 'ANALYTICALFREQ', 'INTEGRATION', 'UNRESTRICTED', 'SYMMETRY', 'SCF', 'XC', 'UNITS'}¶
-
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: AdfKey
-
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: AdfKey Raises: ValueError– Currently nested subkeys are not supported. Ifsubendwas 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
-
key¶ 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.
-
remove_subkey(subkey)[source]¶ Remove the given subkey, if existed, from this AdfKey.
Parameters: subkey (str or AdfKey) – The subkey to remove.
-
sub_keys= {'AtomDepQuality'}¶
-
class
AdfOutput(filename)[source]¶ Bases:
objectA basic ADF output file parser.
-
is_failed¶ bool – True is the ADF job is terminated without success. Otherwise False.
-
is_internal_crash¶ bool – True if the job is terminated with internal crash. Please read ‘TAPE13’ of the ADF manual for more detail.
-
error¶ str – The error description.
-
run_type¶ str – The RunType of this ADF job. Possible options are: ‘SinglePoint’, ‘GeometryOptimization’, ‘AnalyticalFreq’ and ‘NUmericalFreq’.
-
final_energy¶ float – The final molecule energy (a.u).
-
final_structure¶ GMolecule – The final structure of the molecule.
-
energies¶ Sized – The energy of each cycle.
-
structures¶ Sized – The structure of each cycle If geometry optimization is performed.
-
frequencies¶ array_like – The frequencies of the molecule.
-
normal_modes¶ array_like – The normal modes of the molecule.
-
freq_type¶ str – Either ‘Analytical’ or ‘Numerical’.
Initialization method.
Parameters: filename (str) – The ADF output file to parse. -
-
exception
AdfOutputError[source]¶ Bases:
ExceptionThe 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:
monty.json.MSONableBasic 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: AdfTask
-
operations= {'energy': 'Evaluate the single point energy.', 'optimize': 'Minimize the energy by varying the molecular structure.', 'frequencies': 'Compute second derivatives and print out an analysis of molecular vibrations.', 'freq': 'Same as frequencies.', 'numerical_frequencies': 'Compute molecular frequencies using numerical method.'}¶