aiida_gulp.potentials package¶
Submodules¶
aiida_gulp.potentials.base module¶
-
class
aiida_gulp.potentials.base.PotentialContent(content, number_of_flags, number_flagged)¶ Bases:
tupleused for returning the content creation for a potential
- Parameters
-
__getnewargs__()¶ Return self as a plain tuple. Used by copy and pickle.
-
static
__new__(_cls, content, number_of_flags, number_flagged)¶ Create new instance of PotentialContent(content, number_of_flags, number_flagged)
-
__repr__()¶ Return a nicely formatted representation string
-
property
content¶ Alias for field number 0
-
property
number_flagged¶ Alias for field number 2
-
property
number_of_flags¶ Alias for field number 1
-
class
aiida_gulp.potentials.base.PotentialWriterAbstract[source]¶ Bases:
objectabstract class for creating gulp inter-atomic potential inputs, from a data dictionary.
sub-classes should override the
get_description,get_schema,_make_stringandread_exisingmethods-
create_content(data, species_filter=None, fitting_data=None)[source]¶ create string for inter-atomic potential section for main.gin file
- Parameters
data (dict) – dictionary of data required to create potential
species_filter (list[str] or None) – list of atomic symbols to filter by
fitting_data (dict or None) – a dictionary specifying which variables to flag for optimisation, of the form; {<type>: {<index>: [variable1, …]}} if None, no flags will be added
- Returns
- Return type
-
classmethod
get_fitting_schema()[source]¶ return the schema to validate input data
- Returns
- Return type
-
static
read_atom_section(lines, lineno, number_atoms, global_args=None)[source]¶ read a section of a potential file, e.g.
H core He shell 1.00000000E+00 2.00000000E+00 12.00000 0 1 H B 3.00000000E+00 4.00000000E+00 0.00 12.00000 1 0
- Parameters
- Returns
int (lineno) – the final line of the section
set (species_set) – a set of species identified in the section
dict (results) – {tuple[species]: {“values”: str, “global”: global_args}}
- Raises
IOError – If a parsing error occurs
-
aiida_gulp.potentials.common module¶
-
aiida_gulp.potentials.common.filter_by_species(data, species)[source]¶ filter a potential dict by a subset of species
- Parameters
- Returns
data filtered by species and with all species index keys re-indexed
- Return type
- Raises
KeyError – if the data does not adhere to the potential or fitting jsonschema
AssertionError – if the filter set is not a subset of the available species
aiida_gulp.potentials.lj module¶
-
class
aiida_gulp.potentials.lj.PotentialWriterLJ[source]¶ Bases:
aiida_gulp.potentials.base.PotentialWriterAbstractclass for creating gulp lennard-jones type inter-atomic potential inputs
aiida_gulp.potentials.raw_reaxff module¶
-
aiida_gulp.potentials.raw_reaxff.create_gulp_fields(data, data_type, fields, species_val_fmt, conditions=None, arguments=None, fitting_data=None)[source]¶ Create a subsection of the gulp output file.
-
aiida_gulp.potentials.raw_reaxff.format_gulp_value(data, data_type, indices, key, species_val_fmt)[source]¶ Format values, using GULP specific conversions.
-
aiida_gulp.potentials.raw_reaxff.read_lammps_format(lines, tolerances=None)[source]¶ Read a reaxff file, in lammps format, to a standardised potential dictionary.
- Parameters
- Returns
- Return type
Notes
Default tolerances:
anglemin: 0.001
angleprod: 0.001
hbondmin: 0.01
hbonddist: 7.5
torsionprod: 1e-05
-
aiida_gulp.potentials.raw_reaxff.write_gulp_format(data, fitting_data=None, global_val_fmt='{:.5E}', species_val_fmt='{:.5E}')[source]¶ Write a reaxff file, in GULP format, from a standardised potential dictionary
NOTE: GULP only read a line up to ~80 characters, & can be used to break a line into two lines NOTE GULP outputs to 6 dp
energies should be supplied in kcal (the default of the lammps file format)
aiida_gulp.potentials.reaxff module¶
-
class
aiida_gulp.potentials.reaxff.PotentialWriterReaxff[source]¶ Bases:
aiida_gulp.potentials.base.PotentialWriterAbstractclass for creating gulp reaxff type inter-atomic potential inputs