Skip to content

Commit

Permalink
Merge branch 'new_Data' of https://github.com/aiidateam/aiida-atomistic
Browse files Browse the repository at this point in the history
… into new_Data
  • Loading branch information
Miki Bonacci authored and Miki Bonacci committed Dec 12, 2023
2 parents db4e729 + 48f3fcb commit 5c734e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/source/user_guide/structuredata/structuredata.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Units of magnetization are Bohr magnetons.
TOBE ADDED: See the corresponding page on `magnetization` to have a full description of the property.

**Property definition**: in the constructor, each property is provided by means of standard python built-in data types, e.g. lists, tuples, int and so on. We allow only a unique way to define/provide a given property, e.g. magnetization must be always provided as a *list of 3D vectors*, one for each atom (even if the magnetization is zero somewhere). This will simplify types, units and consistency checks.
Some property class will be provided with classmethods used to convert from other to the pre-defined format. For example, we can invoke `Magnetization.from_collinear([1,-1,...0],direction=[cos(a),cos(b),cos(c)])` to produce the required list of 3D vectors needed in our StructureData instance definition.
Some property class will be provided with classmethods used to convert from other to the pre-defined format. For example, we can invoke `Magnetization.from_collinear([1,-1,...0],direction=[cos(a),cos(b),cos(c)])` to produce the required list of 3D vectors needed in our StructureData instance definition. We may also define a `to_collinear` methods, but this will not be useful in terms of the property definition inside the StructureData node.

## The immutability of the `StructureData` instance and constructors

Expand Down Expand Up @@ -178,6 +178,9 @@ this will provide the tab completion for all supported/available properties, eac
However, other attributes like `units` will be provided.
(TOBE DISCUSSED: ...these non-system dependent attributes are not stored in the database: they will be always defined as class attributes, as they are defined once for all)

If an unsupported property it defined during the StructureData instance generation, an error is raised.
However, there is the possibility to define custom properties in a specific way (see the corresponding section - TOBE ADDED).

### List of stored properties

Stored properties of a `StructureData` node can be accessed singularly via the corresponding attribute, as seen in the previous subsection.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ docs = [
'sphinx-click~=4.4.0',
'sphinx-design~=0.4.1',
'sphinxcontrib-details-directive~=0.1.0',
'sphinx-autoapi~=2.0.1',
'sphinx-autoapi~=3.0.0',
'myst_parser~=1.0.0',
]
[project.entry-points."aiida.data"]
Expand Down

0 comments on commit 5c734e4

Please sign in to comment.