aim2dat.aiida_data.gaussian_cube_data
¶
AiiDA data classes for gaussian cube files.
Module Contents¶
Classes¶
AiiDA data object to store gaussian cube files. |
- class aim2dat.aiida_data.gaussian_cube_data.GaussianCubeData(**kwargs)[source]¶
Bases:
aiida.orm.Data
AiiDA data object to store gaussian cube files.
Overview
¶ Return the atomic charges.
Return the atomic numbers.
Return the atomic positions (in bohr).
Get the backend for this entity
Get the implementing class for this object
Return the cell.
Return the second line of the cube file.
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 data set identifiers.
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.
Return the node mtime.
Return the node type.
Return the origin of the data.
Return the primary key for this entity.
Return the node process type.
Return the number of points in each direction.
Gets the dictionary describing the source of Data object. Possible fields:
Return the title of the cube file.
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.
Get content of the cube file.
Get cube data points.
Return a string with a description of the node.
class Get the list of valid export format strings
get_structure
(unit)Get underlying structure.
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.
open_cube
(path)Open cube file.
set_from_file
(file_obj)class Set information from existing cube file.
set_source
(source)Sets the dictionary describing the source of Data object.
store
()Store the node in the database while saving its attributes and repository directory.
Store the node, together with all input links.
- property backend : aiida.orm.implementation.StorageBackend¶
Get the backend for this entity
- property backend_entity : BackendEntityType¶
Get the implementing class for this object
- 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 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 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 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
-
get_structure(unit=
'angstrom'
)[source]¶ Get underlying structure.
- Parameters:¶
unit (str) – Length unit.
-
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
- classmethod set_from_file(file_obj)[source]¶
Set information from existing cube file.
- Returns:¶
GaussianCubeData – Data object containing the information from the file.
- set_source(source)¶
Sets the dictionary describing the source of Data object.
- 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.