aim2dat.aiida_data.surface_data
¶
AiiDA data classes for surfaces.
Module Contents¶
Classes¶
AiiDA data object to store surface data. |
-
class aim2dat.aiida_data.surface_data.SurfaceData(aperiodic_dir=
2
, miller_indices=(1, 0, 0)
, termination=1
, **kwargs)[source]¶ Bases:
aiida.orm.Data
AiiDA data object to store surface data.
Overview
¶ Non-periodic direction of the slab.
Get the backend for this entity
Get the implementing class for this object
Bottom terminating structure of the surface.
Return the computer of this node.
Return the creator of this node or None if it does not exist.
Return the node ctime.
Return the node description.
Return the id for this entity.
Return whether the entity is stored.
Hook to exclude certain
Node
classes from being considered a valid cache.Return the node label.
Return the logger configured for this Node.
Miller indices of the surface facet.
Return the node mtime.
Return the node type.
Return the primary key for this entity.
Return the node process type.
Repeating structure of the surface.
Gets the dictionary describing the source of Data object. Possible fields:
Surface area.
Termination of the surface facet.
Top terminating structure of the surface.
Top terminating non-symmetric structure of the surface.
Return the user of this node.
Return the node UUID.
¶ Return the collection type for this class.
base
()Return the node base namespace.
Returns the node type of this node (sub) class.
clone
()Create a clone of the Data node.
Get a collection for objects of this type, with the default backend.
convert
(object_format, *args)Convert the AiiDA StructureData into another python object
Return the entry point associated this node class.
export
(path, fileformat, overwrite, **kwargs)Save a Data object to a file.
get
(**kwargs)class Get an entity of the collection matching the given filters.
get_collection
(backend)class Get a collection for objects of this type for a given backend.
Return a string with a description of the node.
class Get the list of valid export format strings
importfile
(fname, fileformat)Populate a Data object from a file.
importstring
(inputstring, fileformat, **kwargs)Converts a Data object to other text format.
Initialize instance attributes.
objects
()Get a collection for objects of this type, with the default backend.
set_bottom_terminating_structure
(elements, positions, cell, is_cartesian, kinds)Set bottom-terminating non-symmetric structure.
set_repeating_structure
(elements, positions, cell, is_cartesian, translational_vector, kinds)Set repeating structure.
set_source
(source)Sets the dictionary describing the source of Data object.
set_top_terminating_structure
(elements, positions, cell, is_cartesian, kinds)Set top-terminating structure.
set_top_terminating_structure_nsym
(elements, positions, cell, is_cartesian)Set top-terminating non-symmetric structure.
store
()Store the node in the database while saving its attributes and repository directory.
Store the node, together with all input links.
- property aperiodic_dir¶
Non-periodic direction of the slab.
- property backend : aiida.orm.implementation.StorageBackend¶
Get the backend for this entity
- property backend_entity : BackendEntityType¶
Get the implementing class for this object
- property bottom_terminating_structure¶
Bottom terminating structure of the surface.
- property computer : aiida.orm.computers.Computer | None¶
Return the computer of this node.
- property creator¶
Return the creator of this node or None if it does not exist.
- Returns:¶
the creating node or None
- property id : int | None¶
Return the id for this entity.
This identifier is guaranteed to be unique amongst entities of the same type for a single backend instance.
- Returns:¶
the entity’s id
- property is_stored : bool¶
Return whether the entity is stored.
- property is_valid_cache : bool¶
Hook to exclude certain
Node
classes from being considered a valid cache.The base class assumes that all node instances are valid to cache from, unless the
_VALID_CACHE_KEY
extra has been set toFalse
explicitly. Subclasses can override this property with more specific logic, but should probably also consider the value returned by this base class.
- property logger : logging.Logger | None¶
Return the logger configured for this Node.
- Returns:¶
Logger object
- property miller_indices¶
Miller indices of the surface facet.
- property pk : int | None¶
Return the primary key for this entity.
This identifier is guaranteed to be unique amongst entities of the same type for a single backend instance.
- Returns:¶
the entity’s principal key
- property repeating_structure¶
Repeating structure of the surface.
- property source¶
Gets the dictionary describing the source of Data object. Possible fields:
db_name: name of the source database.
db_uri: URI of the source database.
uri: URI of the object’s source. Should be a permanent link.
id: object’s source identifier in the source database.
version: version of the object’s source.
extras: a dictionary with other fields for source description.
source_md5: MD5 checksum of object’s source.
description: human-readable free form description of the object’s source.
license: a string with a type of license.
Note
some limitations for setting the data source exist, see
_validate
method.- Returns:¶
dictionary describing the source of Data object.
- property surface_area¶
Surface area.
- property termination¶
Termination of the surface facet.
- property top_terminating_structure¶
Top terminating structure of the surface.
- property top_terminating_structure_nsym¶
Top terminating non-symmetric structure of the surface.
- property user : aiida.orm.users.User¶
Return the user of this node.
- Collection()¶
Return the collection type for this class.
This used to be a class argument with the value
NodeCollection
. The argument is deprecated and this property is here for backwards compatibility to print the deprecation warning.
- base() NodeBase ¶
Return the node base namespace.
- class_node_type() str ¶
Returns the node type of this node (sub) class.
- collection() CollectionType ¶
Get a collection for objects of this type, with the default backend.
- Returns:¶
an object that can be used to access entities of this type
-
convert(object_format=
None
, *args)¶ Convert the AiiDA StructureData into another python object
- entry_point() importlib_metadata.EntryPoint | None ¶
Return the entry point associated this node class.
- Returns:¶
the associated entry point or
None
if it isn’t known.
-
export(path, fileformat=
None
, overwrite=False
, **kwargs)¶ Save a Data object to a file.
- Parameters:¶
- fname
string with file name. Can be an absolute or relative path.
- fileformat=
None
¶ kind of format to use for the export. If not present, it will try to use the extension of the file name.
- overwrite=
False
¶ if set to True, overwrites file found at path. Default=False
- **kwargs¶
additional parameters to be passed to the _exportcontent method
- Returns:¶
the list of files created
- classmethod get(**kwargs)¶
Get an entity of the collection matching the given filters.
- classmethod get_collection(backend: aiida.orm.implementation.StorageBackend)¶
Get a collection for objects of this type for a given backend.
Note
Use the
collection
class property instead if the currently loaded backend or backend of the default profile should be used.
- get_description() str ¶
Return a string with a description of the node.
- Returns:¶
a description string
- classmethod get_export_formats()¶
Get the list of valid export format strings
- Returns:¶
a list of valid formats
-
importfile(fname, fileformat=
None
)¶ Populate a Data object from a file.
- importstring(inputstring, fileformat, **kwargs)¶
Converts a Data object to other text format.
- initialize() None ¶
Initialize instance attributes.
This will be called after the constructor is called or an entity is created from an existing backend entity.
- objects() CollectionType ¶
Get a collection for objects of this type, with the default backend.
Deprecated since version This: will be removed in v3, use
collection
instead.- Returns:¶
an object that can be used to access entities of this type
-
set_bottom_terminating_structure(elements, positions, cell, is_cartesian, kinds=
None
)[source]¶ Set bottom-terminating non-symmetric structure.
- Parameters:¶
elements (list) – List of elements or atomic numbers.
positions (list) – Nested list of the coordinates, either in cartesian or scaled coordinates.
cell (list or np.array) – Nested 3x3 list of the cell vectors in angstrom.
is_cartesian (bool) – Whether the coordinates are cartesian or scaled.
-
set_repeating_structure(elements, positions, cell, is_cartesian, translational_vector, kinds=
None
)[source]¶ Set repeating structure.
- Parameters:¶
elements (list) – List of elements or atomic numbers.
positions (list) – Nested list of the coordinates, either in cartesian or scaled coordinates.
cell (list or np.array) – Nested 3x3 list of the cell vectors in angstrom.
is_cartesian (bool) – Whether the coordinates are cartesian or scaled.
translational_vector (list or np.array) – Translational shift between two layers of repeating units.
- set_source(source)¶
Sets the dictionary describing the source of Data object.
-
set_top_terminating_structure(elements, positions, cell, is_cartesian, kinds=
None
)[source]¶ Set top-terminating structure.
- Parameters:¶
elements (list) – List of elements or atomic numbers.
positions (list) – Nested list of the coordinates, either in cartesian or scaled coordinates.
cell (list or np.array) – Nested 3x3 list of the cell vectors in angstrom.
is_cartesian (bool) – Whether the coordinates are cartesian or scaled.
- set_top_terminating_structure_nsym(elements, positions, cell, is_cartesian)[source]¶
Set top-terminating non-symmetric structure.
- Parameters:¶
elements (list) – List of elements or atomic numbers.
positions (list) – Nested list of the coordinates, either in cartesian or scaled coordinates.
cell (list or np.array) – Nested 3x3 list of the cell vectors in angstrom.
is_cartesian (bool) – Whether the coordinates are cartesian or scaled.
- store() Node ¶
Store the node in the database while saving its attributes and repository directory.
After being called attributes cannot be changed anymore! Instead, extras can be changed only AFTER calling this store() function.
- Note:¶
After successful storage, those links that are in the cache, and for which also the parent node is already stored, will be automatically stored. The others will remain unstored.
- store_all() Node ¶
Store the node, together with all input links.
Unstored nodes from cached incoming linkswill also be stored.