aiida_crystal17.parsers.raw package

Submodules

aiida_crystal17.parsers.raw.crystal_fort25 module

aiida_crystal17.parsers.raw.crystal_fort25.parse_crystal_fort25(content)[source]

Parse the fort.25 output from CRYSTAL.

Notes

File Format:

1ST RECORD : -%-,IHFERM,TYPE,NROW,NCOL,DX,DY,COSXY (format : A3,I1,A4,2I5,1P,(3E12.5))
2ND RECORD : X0,Y0 (format : 1P,6E12.5)
3RD RECORD : I1,I2,I3,I4,I5,I6 (format : 6I3)
4TH RECORD
AND FOLLOWING : ((RDAT(I,J),I=1,NROW),J=1,NCOL) (format : 1P,6E12.5)

Meaning of the variables:
1   NROW            1 (DOSS are written one projection at a time)
    NCOL            number of energy points in which the DOS is calculated
    DX              energy increment (hartree)
    DY              not used
    COSXY           Fermi energy (hartree)
2   X0              energy corresponding to the first point
    Y0              not used
3   I1              number of the projection;
    I2              number of atomic orbitals of the projection;
    I3,I4,I5,I6     not used
4   RO(J),J=1,NCOL  DOS: density of states ro(eps(j)) (atomic units).
aiida_crystal17.parsers.raw.crystal_fort25.parse_crystal_fort25_aiida(fileobj)[source]

Take the result from parse_crystal_fort25 and prepares it for AiiDA output.

aiida_crystal17.parsers.raw.crystal_fort9 module

class aiida_crystal17.parsers.raw.crystal_fort9.Fort9Results(cell, atomic_numbers, positions, transform_matrix, n_symops, n_orbitals)

Bases: tuple

Create new instance of Fort9Results(cell, atomic_numbers, positions, transform_matrix, n_symops, n_orbitals)

_asdict()

Return a new OrderedDict which maps field names to their values.

_fields = ('cell', 'atomic_numbers', 'positions', 'transform_matrix', 'n_symops', 'n_orbitals')
_fields_defaults = {}
classmethod _make(iterable)

Make a new Fort9Results object from a sequence or iterable

_replace(**kwds)

Return a new Fort9Results object replacing specified fields with new values

property atomic_numbers

Alias for field number 1

property cell

Alias for field number 0

property n_orbitals

Alias for field number 5

property n_symops

Alias for field number 4

property positions

Alias for field number 2

property transform_matrix

Alias for field number 3

aiida_crystal17.parsers.raw.crystal_fort9.parse_fort9(file_obj, length_units='angstrom')[source]

Parse data from the fort.9 wavefunction.

Parameters
  • file_obj (str or file-like) – filepath or file opened in binary mode

  • length_units (str) – units to return cell and position lengths (‘bohr’ or ‘angstrom’)

Returns

Return type

Fort9Results

aiida_crystal17.parsers.raw.crystal_ppan module

aiida_crystal17.parsers.raw.crystal_ppan._new_line(lines)[source]
aiida_crystal17.parsers.raw.crystal_ppan.parse_crystal_ppan(content)[source]

Parse CRYSTAL Mulliken Population outputs (PPAN.DAT)

Parameters

content (str) –

Notes

Format:

NSPIN,NATOM
IAT,NSHELL
Xiat,Yiat,Ziat (AU)
QTOT shell charges
NORB
orbital charges

aiida_crystal17.parsers.raw.crystal_stdout module

Parse the stdout content from a CRYSTAL SCF/optimization computation.

Basic outline of parsing sections:

<parse_pre_header>
***************************
<parse_calculation_header>
***************************
<parse_geometry_input>
* GEOMETRY EDITING
<parse_calculation_setup>
CRYSTAL - SCF - TYPE OF CALCULATION :
<parse_scf_section>
SCF ENDED
<parse_scf_final_energy>
OPTOPTOPTOPT
<parse_optimisation>
OPT END -
<parse_band_gaps>
FINAL OPTIMIZED GEOMETRY
<parse_final_geometry>
MULLIKEN POPULATION ANALYSIS
<parse_mulliken_analysis>
class aiida_crystal17.parsers.raw.crystal_stdout.ParsedSection(next_lineno, data, parser_error, non_terminating_error)

Bases: tuple

Create new instance of ParsedSection(next_lineno, data, parser_error, non_terminating_error)

_asdict()

Return a new OrderedDict which maps field names to their values.

_fields = ('next_lineno', 'data', 'parser_error', 'non_terminating_error')
_fields_defaults = {}
classmethod _make(iterable)

Make a new ParsedSection object from a sequence or iterable

_replace(**kwds)

Return a new ParsedSection object replacing specified fields with new values

property data

Alias for field number 1

property next_lineno

Alias for field number 0

property non_terminating_error

Alias for field number 3

property parser_error

Alias for field number 2

aiida_crystal17.parsers.raw.crystal_stdout.assign_exit_code(output)[source]
aiida_crystal17.parsers.raw.crystal_stdout.extract_final_info(parsed_data)[source]

Extract the final energies and primitive geometry/symmetry from the relevant sections of the parse data (depending if it was an optimisation or not)

aiida_crystal17.parsers.raw.crystal_stdout.initial_parse(lines)[source]

Scan the file for errors, and find the final elapsed time value.

aiida_crystal17.parsers.raw.crystal_stdout.parse_band_gaps(lines, initial_lineno)[source]

read band gap information

Note: this is new for CRYSTAL17

Parameters
Returns

Return type

ParsedSection

aiida_crystal17.parsers.raw.crystal_stdout.parse_calculation_header(lines, initial_lineno)[source]

Parse calculation header

Parameters
Returns

Return type

ParsedSection

aiida_crystal17.parsers.raw.crystal_stdout.parse_calculation_setup(lines, initial_lineno)[source]

Parse initial setup data (starting after initial geometry input).

Parameters
Returns

Return type

ParsedSection

aiida_crystal17.parsers.raw.crystal_stdout.parse_final_geometry(lines, initial_lineno)[source]

read final optimized geometry section

Parameters
Returns

Return type

ParsedSection

aiida_crystal17.parsers.raw.crystal_stdout.parse_geometry_input(lines, initial_lineno)[source]

Parse geometry input data.

Parameters
Returns

Return type

ParsedSection

aiida_crystal17.parsers.raw.crystal_stdout.parse_geometry_section(data, initial_lineno, line, lines)[source]

Parse a section of geometry related variables.

Parameters
  • data (dict) – existing data to add the geometry data to

  • initial_lineno (int) –

  • line (str) – the current line

  • lines (list[str]) –

Notes

For initial and ‘FINAL OPTIMIZED GEOMETRY’ only:

DIRECT LATTICE VECTORS CARTESIAN COMPONENTS (ANGSTROM)
        X                    Y                    Z
0.355114561000E+01   0.000000000000E+00   0.000000000000E+00
0.000000000000E+00   0.355114561000E+01   0.000000000000E+00
0.000000000000E+00   0.000000000000E+00   0.535521437000E+01

CARTESIAN COORDINATES - PRIMITIVE CELL
*******************************************************************************
*      ATOM          X(ANGSTROM)         Y(ANGSTROM)         Z(ANGSTROM)
*******************************************************************************
    1    26 FE    0.000000000000E+00  0.000000000000E+00  0.000000000000E+00
    2    26 FE    1.775572805000E+00  1.775572805000E+00  0.000000000000E+00
    3    16 S    -1.110223024625E-16  1.775572805000E+00  1.393426779074E+00
    4    16 S     1.775572805000E+00  7.885127240037E-16 -1.393426779074E+00

For initial, final and optimisation steps:

Primitive cell:

PRIMITIVE CELL - CENTRING CODE 1/0 VOLUME=    36.099581 - DENSITY  6.801 g/cm^3
        A              B              C           ALPHA      BETA       GAMMA
    2.94439264     2.94439264     4.16400000    90.000000  90.000000  90.000000
*******************************************************************************
ATOMS IN THE ASYMMETRIC UNIT    4 - ATOMS IN THE UNIT CELL:    4
    ATOM                 X/A                 Y/B                 Z/C
*******************************************************************************
    1 T  28 NI    0.000000000000E+00  0.000000000000E+00  0.000000000000E+00

Crystallographic cell (only if the geometry is not originally primitive):

CRYSTALLOGRAPHIC CELL (VOLUME=         74.61846100)
        A              B              C           ALPHA      BETA       GAMMA
    4.21000000     4.21000000     4.21000000    90.000000  90.000000  90.000000

COORDINATES IN THE CRYSTALLOGRAPHIC CELL
    ATOM                 X/A                 Y/B                 Z/C
*******************************************************************************
    1 T  12 MG    0.000000000000E+00  0.000000000000E+00  0.000000000000E+00
aiida_crystal17.parsers.raw.crystal_stdout.parse_mulliken_analysis(lines, mulliken_indices)[source]
Parameters
Returns

Return type

ParsedSection

aiida_crystal17.parsers.raw.crystal_stdout.parse_optimisation(lines, initial_lineno)[source]

read geometric optimisation

Parameters
Returns

Return type

ParsedSection

aiida_crystal17.parsers.raw.crystal_stdout.parse_pre_header(lines, initial_lineno=0)[source]

Parse any data before the program header

note this is only for runs using runcry (not straight from the binary)

Parameters
Returns

Return type

ParsedSection

aiida_crystal17.parsers.raw.crystal_stdout.parse_scf_final_energy(lines, initial_lineno, final_lineno=None)[source]

read post initial scf data

Parameters
aiida_crystal17.parsers.raw.crystal_stdout.parse_scf_section(lines, initial_lineno, final_lineno=None)[source]

read scf data

Parameters
Returns

Return type

ParsedSection

aiida_crystal17.parsers.raw.crystal_stdout.parse_section(func, lines, initial_lineno, output, key_name)[source]

parse a section of the stdout file

Parameters
  • func (callable) – a function that returns a ParsedSection object

  • lines (list[str]) –

  • initial_lineno (int) –

  • output (dict) – current output from the parser

  • key_name (str or list[str] or None) – the key_name of output to assign the data to (if None directly update)

Returns

Return type

ParsedSection or None

aiida_crystal17.parsers.raw.crystal_stdout.parse_symmetry_section(data, initial_lineno, line, lines)[source]

update dict with symmetry related variables

Parameters
  • data (dict) – existing data to add the geometry data to

  • initial_lineno (int) –

  • line (str) – the current line

  • lines (list[str]) –

aiida_crystal17.parsers.raw.crystal_stdout.read_crystal_stdout(content)[source]

Parse the stdout content from a CRYSTAL SCF/optimization computation to a dict.

aiida_crystal17.parsers.raw.crystal_stdout.strip_non_program_output(content)[source]

Remove MPI statuses, and floating point exceptions.

These can get mixed with the program stdout/stderr and corrupt the output

Parameters

content (str) –

Returns

  • str (content)

  • list[str] (warnings)

aiida_crystal17.parsers.raw.doss_input module

aiida_crystal17.parsers.raw.doss_input.create_doss_content(params, validate=True)[source]

create the contents of a doss.d3 input file

Parameters
  • params (dict) –

  • validate (bool) – Validate the parameters against the JSON schema

Returns

Return type

list[str]

Notes

NPRO; number of additional (to total) projected densities to calculate (<= 15) NPT; number of uniformly spaced energy values (from bottom of band INZB to top of band IFNB) INZB; band considered in DOS calculation IFNB; last band considered in DOS calculation IPLO; output type (1 = to .d25 file) NPOL; number of Legendre polynomials used to expand DOSS (<= 25) NPR; number of printing options to switch on

Unit of measurement: energy: hartree; DOSS: state/hartree/cell.

aiida_crystal17.parsers.raw.doss_input.read_doss_contents(content)[source]

read the contents of a doss.d3 input file

aiida_crystal17.parsers.raw.gaussian_cube module

Parse gaussian cube files, e.g. DENSCUBE.DAT, SPINCUBE.DAT, POTCUBE.DAT.

The specification can be found at: http://h5cube-spec.readthedocs.io/en/latest/cubeformat.html

class aiida_crystal17.parsers.raw.gaussian_cube.GcubeResult(header, cell, voxel_cell, voxel_grid, origin, atoms_positions, atoms_nuclear_charge, atoms_atomic_number, units, density)

Bases: tuple

Create new instance of GcubeResult(header, cell, voxel_cell, voxel_grid, origin, atoms_positions, atoms_nuclear_charge, atoms_atomic_number, units, density)

_asdict()

Return a new OrderedDict which maps field names to their values.

_fields = ('header', 'cell', 'voxel_cell', 'voxel_grid', 'origin', 'atoms_positions', 'atoms_nuclear_charge', 'atoms_atomic_number', 'units', 'density')
_fields_defaults = {}
classmethod _make(iterable)

Make a new GcubeResult object from a sequence or iterable

_replace(**kwds)

Return a new GcubeResult object replacing specified fields with new values

property atoms_atomic_number

Alias for field number 7

property atoms_nuclear_charge

Alias for field number 6

property atoms_positions

Alias for field number 5

property cell

Alias for field number 1

property density

Alias for field number 9

property header

Alias for field number 0

property origin

Alias for field number 4

property units

Alias for field number 8

property voxel_cell

Alias for field number 2

property voxel_grid

Alias for field number 3

aiida_crystal17.parsers.raw.gaussian_cube.read_gaussian_cube(handle, return_density=False, dist_units='angstrom')[source]

Parse gaussian cube files to a data structure.

The specification can be found at: http://h5cube-spec.readthedocs.io/en/latest/cubeformat.html

CRYSTAL outputs include DENSCUBE.DAT, SPINCUBE.DAT, POTCUBE.DAT.

Parameters
  • handle (file-like) – an open file handle

  • return_density (bool) – whether to read and return the density values

  • dist_units (str) – the distance units to return

Returns

Return type

aiida_crystal17.parsers.raw.gaussian_cube.GcubeResult

aiida_crystal17.parsers.raw.inputd12_read module

module for reading main.d12 (for immigration)

aiida_crystal17.parsers.raw.inputd12_read._append_key(dct, key, value)[source]

create a list or append to existing

aiida_crystal17.parsers.raw.inputd12_read._get_atom_prop(lines, ptype)[source]

extract atoms

aiida_crystal17.parsers.raw.inputd12_read._pop_line(lines, num=1)[source]

extract the first line(s)

aiida_crystal17.parsers.raw.inputd12_read._read_basis_block(atom_props, basis_sets, lines, output_dict, schema)[source]
aiida_crystal17.parsers.raw.inputd12_read._read_dft_block(lines, output_dict, schema)[source]
aiida_crystal17.parsers.raw.inputd12_read._read_geom_block(lines, output_dict, schema)[source]
aiida_crystal17.parsers.raw.inputd12_read._read_geomopt_block(atom_props, line, lines, output_dict, schema)[source]
aiida_crystal17.parsers.raw.inputd12_read._read_hamiltonian_block(atom_props, lines, output_dict, schema)[source]
aiida_crystal17.parsers.raw.inputd12_read._split_line(line)[source]

split a line into a list of integers and/or floats

aiida_crystal17.parsers.raw.inputd12_read.extract_data(input_string)[source]

extract data from a main.d12 CRYSTAL17 file

  • Any geometry creation commands are ignored

  • Basis sets must be included explicitly (no keywords) and are read into the basis_sets list

  • FRAGMENT, GHOSTS and ATOMSPIN commands are read into the atom_props dict

  • Otherwise, only commands contained in the inputd12.schema.json are allowed

Parameters

input_string – a string if the content of the file

Returns param_dict

the parameter dict for use in crystal17.main calculation

Returns basis_sets

a list of the basis sets

Returns atom_props

a dictionary of atom specific values (spin_alpha, spin_beta, ghosts, fragment)

aiida_crystal17.parsers.raw.inputd12_write module

module to write CRYSTAL17 .d12 files

aiida_crystal17.parsers.raw.inputd12_write._basis_set_block(outstr, indict, basis_sets, atom_props)[source]
aiida_crystal17.parsers.raw.inputd12_write._geometry_block(outstr, indict, atom_props)[source]
aiida_crystal17.parsers.raw.inputd12_write._hamiltonian_block(outstr, indict, atom_props)[source]
aiida_crystal17.parsers.raw.inputd12_write.create_atom_properties(structure, kinds_data=None)[source]

create dict of properties for each atom

Parameters
  • structureStructureData

  • kinds_dataKindData atom kind data for each atom

Returns

dict of atom properties

Return type

dict

aiida_crystal17.parsers.raw.inputd12_write.format_value(dct, keys)[source]

Return the value + a new line, or empty string if keys not found.

aiida_crystal17.parsers.raw.inputd12_write.write_input(indict, basis_sets, atom_props=None)[source]

Write input of a validated input dictionary.

Parameters
  • indict (dict) – dictionary of inputs

  • basis_sets (list) – list of basis set strings or objects with content property

  • atom_props (dict or None) – atom ids with specific properties; “spin_alpha”, “spin_beta”, “unfixed”, “ghosts”

Returns

Return type

str

aiida_crystal17.parsers.raw.main_out module

Parse the main output file and create the required output nodes.

class aiida_crystal17.parsers.raw.main_out.OutputNodes[source]

Bases: collections.abc.Mapping

A mapping of output nodes, with attribute access.

_abc_impl = <_abc_data object>
_get_results()[source]
_get_structure()[source]
_get_symmetry()[source]
_set_results(value)[source]
_set_structure(value)[source]
_set_symmetry(value)[source]
property results
property structure
property symmetry
class aiida_crystal17.parsers.raw.main_out.ParserResult[source]

Bases: object

aiida_crystal17.parsers.raw.main_out._extract_mulliken(data, param_data)[source]

Extract mulliken electronic charge partition data.

aiida_crystal17.parsers.raw.main_out._extract_structure(final_data, init_struct, results_data, parser_result, exit_codes)[source]

Create a StructureData object of the final configuration.

aiida_crystal17.parsers.raw.main_out._extract_symmetry(final_data, init_settings, param_data, parser_result, exit_codes)[source]

Extract symmetry operations.

aiida_crystal17.parsers.raw.main_out.parse_main_out(fileobj, parser_class, init_struct=None, init_settings=None)[source]

Parse the main output file and create the required output nodes.

Parameters
  • fileobj – handle to main output file

  • parser_class – a string denoting the parser class

  • init_struct – input structure

  • init_settings – input structure settings

:return parse_result

aiida_crystal17.parsers.raw.parse_bases module

class aiida_crystal17.parsers.raw.parse_bases.OrbitalResult(electrons, core_electrons, number_ao, orbital_types, ao_indices)

Bases: tuple

Create new instance of OrbitalResult(electrons, core_electrons, number_ao, orbital_types, ao_indices)

_asdict()

Return a new OrderedDict which maps field names to their values.

_fields = ('electrons', 'core_electrons', 'number_ao', 'orbital_types', 'ao_indices')
_fields_defaults = {}
classmethod _make(iterable)

Make a new OrbitalResult object from a sequence or iterable

_replace(**kwds)

Return a new OrbitalResult object replacing specified fields with new values

property ao_indices

Alias for field number 4

property core_electrons

Alias for field number 1

property electrons

Alias for field number 0

property number_ao

Alias for field number 2

property orbital_types

Alias for field number 3

aiida_crystal17.parsers.raw.parse_bases.compute_orbitals(atoms, basis_sets)[source]

compute data for all atomic orbitals in a structure, given elemental representations by crystal basis sets

Parameters
  • atoms (list[str] or list[int]) – list of atomic numbers or symbols which the structure comprises of

  • basis_sets (dict[str, dict]) – basis set data, in the format returned from parse_bsets_stdin

Returns

Return type

OrbitalResult

aiida_crystal17.parsers.raw.parse_bases.parse_bsets_stdin(content, allow_comments=False, isolated=False)[source]

parse basis sets from a crystal intput file

Parameters
  • content (str) – file content to parse

  • allow_comments (bool) – if True, comments will be stripped before parsing

  • isolated (bool) – if the basis sets are not within the crystal input file

Returns

{‘bs’: {<atom_type>: [{‘type’: <type>, ‘functions’: […]}, …]},

’ecp’: {<atom_type>: [[…], …]}}

Return type

dict

Raises
  • IOError – if an error occurs during the parsing

  • NotImplementedError – if more than 2 basis sets / pseudopotentials are set for one atom type

Notes

Standard Basis Set:

a_number_id n_shells
# for each shell
type shell_type n_functions charge scale_factor
# if type=0, for n_functions
exponent contraction_coefficient

The atomic number Z is given by the remainder of the division of the conventional atomic number by 100 (2 max per species in positions not symmetry-related):

  • a_number_id < 200 > 1000: all electron basis set

  • a_number_id > 200 < 1000: valence electron basis set

Valence-electron only calculations can be performed with the aid of effective core pseudo-potentials (ECP). The ECP input must be inserted into the basis set input of the atoms with conventional atomic number>200.

Effective core pseudo-potentials (ECP) section (p. 75):

INPUT / HAYWLC / HAYWSC / BARTHE / DURAND
# if INPUT insert
effective_core_charge M M0 M1 M2 M3 M4
# insert M+M0+M1+M2+M3+M4 records
a_kl C_kl n_kl

aiida_crystal17.parsers.raw.parse_fort34 module

This module deals with reading/creating .gui files for use with the EXTERNAL keyword.

File Format

dimesionality origin_setting crystal_type energy(optional)
    a_x a_y a_z
    b_x b_y b_z
    c_x c_y c_z
num_symm_ops (in cartesian coordinates)
    op1_rot_00 op1_rot_01 op1_rot_02
    op1_rot_10 op1_rot_11 op1_rot_12
    op1_rot_20 op1_rot_21 op1_rot_22
    op1_trans_0 op1_trans_1 op1_trans_2
    ...
num_atoms (if cryversion<17 irreducible atoms only)
    atomic_number x y z (in cartesian coordinates)
    ...
space_group_int_num num_symm_ops
aiida_crystal17.parsers.raw.parse_fort34.get_centering_code(hall_number)[source]

get crystal centering codes, to convert from primitive to conventional

Parameters

hall_number (int) –

Returns

centering_code

Return type

int

aiida_crystal17.parsers.raw.parse_fort34.get_crystal_type_code(hall_number)[source]

get crystal type code, denoting the crystal system

Parameters

hall_number (int) –

Returns

crystal_type_code

Return type

int

aiida_crystal17.parsers.raw.parse_fort34.get_crystal_type_name(hall_number)[source]

get crystal type code, denoting the crystal system

Parameters

hall_number (int) –

Returns

crystal_type_name

Return type

str

aiida_crystal17.parsers.raw.parse_fort34.gui_file_write(structure_data, symmetry_data=None)[source]

Create string of gui file content (for CRYSTAL17).

Parameters
  • structure_data (aiida.StructureData or dict or ase.Atoms) – dict with keys: ‘pbc’, ‘atomic_numbers’, ‘ccoords’, ‘lattice’, or ase.Atoms, or any object that has method structure_data.get_ase()

  • symmetry_data (dict or None) – keys; ‘crystal_type_code’, ‘centring_code’, ‘space_group’, ‘operations’, ‘basis’

Returns

lines – list of lines in the file

Return type

list[str]

Notes

Older versions of CRYSTAL are not compatible, because they only specify symmetrically inequivalent atomic positions (rather than all)

Symmetry operations and atomic positions are assumed to be cartesian (rather than fractional)

aiida_crystal17.parsers.raw.parse_fort34.parse_fort34(lines, check_final_line=False)[source]

read CRYSTAL geometry fort.34 (aka .gui) file

Parameters
  • lines (list[str]) – list of lines in the file

  • check_final_line (bool) – the final line should contain ‘<space_group_int_num> <num_symm_ops>’, but may also be ‘0 0’ if for example generated by EXTPRT

Returns

  • dict (structure_data)

  • dict (symmetry_data)

Notes

OLDER versions of CRYSTAL are not compatible, because they only specify symmetrically inequivalent atomic positions (rather than all)

Symmetry operations and atomic positions are assumed to be cartesian (rather than fractional)

aiida_crystal17.parsers.raw.parse_fort34.structure_to_symmetry(structure, symprec=1e-05, angle_tolerance=None, as_cartesian=False)[source]

convert a structure data object to a symmetry data dict,

Parameters
  • structure (aiida.StructureData or dict or ase.Atoms) –

  • symprec=1e-5 (float) – Symmetry search tolerance in the unit of length.

  • angle_tolerance=None (float or None) – Symmetry search tolerance in the unit of angle degrees. If the value is negative or None, an internally optimized routine is used to judge symmetry.

  • as_cartesian=False (bool) – if True, convert the (fractional) symmetry operations to cartesian

Returns

keys; ‘crystal_type_code’, ‘centring_code’, ‘space_group’, ‘operations’, ‘basis’

Return type

dict

aiida_crystal17.parsers.raw.pbs module

aiida_crystal17.parsers.raw.pbs.parse_pbs_stderr(file_handle)[source]

look for errors originating from PBS pro std error messages

aiida_crystal17.parsers.raw.prop_inputs module

aiida_crystal17.parsers.raw.prop_inputs._test_unitary(matrix)[source]

Test whether a matrix is unitary (inverse == conjugate transpose).

aiida_crystal17.parsers.raw.prop_inputs.create_rotref_content(params, validate=True)[source]

create the contents of a ppan.d3 input file

Parameters
  • params (dict) –

  • validate (bool) – Validate the parameters against the JSON schema

Returns

Return type

list[str]

aiida_crystal17.parsers.raw.properties_stdout module

Parse the stdout content from a CRYSTAL Properties computation.

aiida_crystal17.parsers.raw.properties_stdout.initial_parse(lines)[source]

Scan the file for errors, and find the final elapsed time value.

aiida_crystal17.parsers.raw.properties_stdout.parse_calculation_inputs(lines, initial_lineno)[source]
aiida_crystal17.parsers.raw.properties_stdout.parse_newk_params(lines, initial_lineno)[source]

Parse NEWK calculation section.

Example:

*******************************************************************************
RESTART WITH NEW K POINTS NET
*******************************************************************************
POINTS IN THE IBZ                 195 POINTS(GILAT NET)              1240
SHRINK FACTORS(MONK.)        18 18 18 SHRINK FACTOR(GILAT)             36
*******************************************************************************
*** K POINTS COORDINATES (OBLIQUE COORDINATES IN UNITS OF IS = 18)
aiida_crystal17.parsers.raw.properties_stdout.read_properties_stdout(content)[source]

Parse the stdout content from a CRYSTAL Properties computation to a dict.

NOTE: this function expects that NEWK is the initial part of the computation

aiida_crystal17.parsers.raw.vesta module

Parse gaussian cube file data to a VESTA input file.

class aiida_crystal17.parsers.raw.vesta.SymbolInfo(radius, r2, r3, r, g, b)

Bases: tuple

Create new instance of SymbolInfo(radius, r2, r3, r, g, b)

_asdict()

Return a new OrderedDict which maps field names to their values.

_fields = ('radius', 'r2', 'r3', 'r', 'g', 'b')
_fields_defaults = {}
classmethod _make(iterable)

Make a new SymbolInfo object from a sequence or iterable

_replace(**kwds)

Return a new SymbolInfo object replacing specified fields with new values

property b

Alias for field number 5

property g

Alias for field number 4

property r

Alias for field number 3

property r2

Alias for field number 1

property r3

Alias for field number 2

property radius

Alias for field number 0

aiida_crystal17.parsers.raw.vesta.create_vesta_input(atoms, cube_filepath=None, settings=None)[source]

Return the file content of a VESTA input file.

Parameters
  • atoms (ase.Atoms) –

  • cube_filepath (str or None) –

  • settings (dict) – Settings that will be merged with the default settings, and validated against ‘vesta_input.schema.json’

Returns

Return type

str

aiida_crystal17.parsers.raw.vesta.get_complete_settings(settings)[source]

Merge any user defined settings with the default dict.

aiida_crystal17.parsers.raw.vesta.get_default_settings()[source]

Return dict of default settings.

aiida_crystal17.parsers.raw.vesta.write_gcube_to_vesta(aiida_gcube, folder_path, file_name, settings=None)[source]

Use an crystal17.gcube data node to create the input files for VESTA.

Parameters
  • aiida_gcube (aiida_crystal17.data.gcube.GaussianCube) –

  • folder_path (str) –

  • file_name (str) – The name of the files (without extension) to write

  • settings (dict) – Settings that will be merged with the default settings, and validated against ‘vesta_input.schema.json’

Module contents