aiida_ce.data package

Submodules

aiida_ce.data.structure_set module

AiiDA class in plugin aiida-ce store the collection of structures.

class aiida_ce.data.structure_set.StructureSet(structurelist=None, **kwargs)[source]

Bases: aiida.orm.nodes.data.array.array.ArrayData

StructureSet stores a collection of structures and stores the energy labeling which calculated by using DFT software. The purpose of StructureSet is 1. prevent the number of nodes from increasing too rapidly 2. Can be used as the output node of the CalcJob or CalcFunction in the plugin 3. Can be used as the training set input for CE process. The class is similar to the TrajectoryData in aiida_core and some of methods are same.

__abstractmethods__ = frozenset([])
__init__(structurelist=None, **kwargs)[source]
Parameters:backend_entity (aiida.orm.implementation.BackendEntity) – the backend model supporting this entity
__module__ = 'aiida_ce.data.structure_set'
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 97
_abc_registry = <_weakrefset.WeakSet object>
_internal_validate(nframes, cells, positions, atomic_numbers, ids, energies)[source]

To validate the type and shape of the array.

_logger = <logging.Logger object>
_plugin_type_string = 'data.ce.StructureSet.StructureSet.'
_query_type_string = 'data.ce.StructureSet.'
get_atomic_numbers()[source]

Return the array of atomic numbers.

get_cells()[source]

Return the array of cells, if it has already been set.

get_positions()[source]

Return the array of positions, if it has already been set.

set_collection(nframes, cells, positions, atomic_numbers, ids=None, energies=None)[source]

Store the collection, after checking that types and dimensions are correct.

This is the main method to initialize the object, all the arrays are set in this method.

Parameters ids and energies are optional variables. If no input is given for ids a consecutive sequence [0,1,2,…,len(nframes)-1] will be assumed.

Parameters:
  • nframes – number of frames needed to represent a structure. An 1D int array, length N, which store the number of frames needed to represent a structure. As for primitive the number is 1, as for x times volume supercell the number of frames is x.
  • cells
  • positions
  • atomic_numbers
  • ids
  • energies
(hide) param cnframes:
 

deduced from nframes, integral of number of frames. Initialized in the method. An 1D int array, length N. Combined with number_of_frames, user can easily index the location and extract the info of the structures stored in this type.

set_structurelist(structurelist)[source]

Create collection from the list of aiida.orm.nodes.data.structure.StructureData instances.

Parameters:structurelist – a list of aiida.orm.nodes.data.structure.StructureData instances.
Raises:ValueError – if symbol lists of supplied structures are invalid

Module contents

Data types provided by plugin

Register data types via the “aiida.data” entry point in setup.json.

class aiida_ce.data.DiffParameters(dict=None, **kwargs)[source]

Bases: aiida.orm.nodes.data.dict.Dict

Command line options for diff.

This class represents a python dictionary used to pass command line options to the executable.

__abstractmethods__ = frozenset([])
__init__(dict=None, **kwargs)[source]

Constructor for the data class

Usage: DiffParameters(dict{'ignore-case': True})

Parameters:
  • parameters_dict (type) – dictionary with commandline parameters
  • parameters_dict – dict
__module__ = 'aiida_ce.data'
__str__()[source]

String representation of node.

Append values of dictionary to usual representation. E.g.:

uuid: b416cbee-24e8-47a8-8c11-6d668770158b (pk: 590)
{'ignore-case': True}
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 97
_abc_registry = <_weakrefset.WeakSet object>
_logger = <logging.Logger object>
_plugin_type_string = 'data.ce.DiffParameters.'
_query_type_string = 'data.ce.'
cmdline_params(file1_name, file2_name)[source]

Synthesize command line parameters.

e.g. [ ‘–ignore-case’, ‘filename1’, ‘filename2’]

Parameters:
  • file_name1 (type) – Name of first file
  • file_name1 – str
  • file_name2 (type) – Name of second file
  • file_name2 – str
schema = <Schema({'ignore-case': <type 'bool'>, 'ignore-tab-expansion': <type 'bool'>, 'ignore-space-change': <type 'bool'>, 'ignore-file-name-case': <type 'bool'>, 'ignore-all-space': <type 'bool'>}, extra=PREVENT_EXTRA, required=False) object>
validate(parameters_dict)[source]

Validate command line options.

Uses the voluptuous package for validation. Find out about allowed keys using:

print(DiffParameters).schema.schema
Parameters:
  • parameters_dict (type) – dictionary with commandline parameters
  • parameters_dict – dict
Returns:

validated dictionary