input_parser¶
-
input_parser.
extract_keywork
(data, beg=0)¶ Extract keywords from the input file starting in
beg
positionExample:
molecule {...} molecule is a keyword basis = ... basis is a keyword
- Parameters
data (str) – the input as string
beg (int) – the starting position
-
input_parser.
fix_casting
(item)¶ Converts a string in its corresponding data type.
Example:
>>> from napmo.system.input_parser import fix_casting >>> fix_casting('2') 2 >>> fix_casting('2.0') 2.0 >>> fix_casting('True') True >>> fix_casting('Test') 'Test'
-
class
input_parser.
InputParser
(data)¶ Input parser class
-
load_basis
(data, group=True, options=None)¶ Loads the basis keyword
- Parameters
data (str) – Relevant data from input corresponding to the keyword
basis
group (bool) – Whether the data is a group ie.
{...}
or just a variablebasis = ...
-
load_code
(data, group=True, options=None)¶ Loads the code keyword
- Parameters
data (str) – Relevant data from input corresponding to the keyword
code
-
load_functional
(data, group=True, options=None)¶ Loads the functionals information for DFT calculations
- Parameters
data (str) – Relevant data from input corresponding to the keyword
functional
group (bool) – Whether the data is a group ie.
{...}
or just a variablefunctional = ...
-
load_molecule
(data, group=True, options=None)¶ Load Molecule information from the input file (Only Cartesian coordinates for now)
- Parameters
data (str) – Relevant data from input corresponding to the keyword
molecule
group (bool) – Whether the data is a group ie.
{...}
or just a variableoptions (str) – Additional options for the group
[...]
besides molecule
-
load_scf
(data, group=True, options=None)¶ Loads the scf keyword
- Parameters
data (str) – Relevant data from input corresponding to the keyword
scf
group (bool) – Whether the data is a group ie.
{...}
or just a variablescf = ...
-