aiida_crystal17.data.struct_settings module

class aiida_crystal17.data.struct_settings.StructSettingsData(**kwargs)[source]

Bases: aiida.orm.data.Data

Stores input symmetry and kind specific setting for a structure (as required by CRYSTAL17)

  • symmetry operations are stored on file (in the style of ArrayData)
  • the rest of the values are stored as attributes in the database
add_path(src_abs, dst_path)[source]

Copy a file or folder from a local file inside the repository directory. If there is a subpath, folders will be created.

Copy to a cache directory if the entry has not been saved yet.

Parameters:
  • src_abs (str) – the absolute path of the file to copy.
  • dst_filename (str) – the (relative) path on which to copy.
Todo:

in the future, add an add_attachment() that has the same meaning of a extras file. Decide also how to store. If in two separate subfolders, remember to reset the limit.

compare_operations(ops, decimal=5)[source]

compare operations against stored ones

Parameters:
  • ops – list of (flattened) symmetry operations
  • decimal – number of decimal points to round values to
Returns:

dict of differences

crystal_system

get the string version of the crystal system (e.g. ‘triclinic’)

crystallographic_transform

get the primitive to crystallographic transformation matrix

data

Return the data as an AttributeDict

data_schema = {'$schema': 'http://json-schema.org/draft-04/schema#', 'additionalProperties': False, 'properties': {'centring_code': {'description': 'The crystal type, as designated by CRYSTAL17', 'maximum': 6, 'minimum': 1, 'type': 'integer'}, 'computation_class': {'description': 'the class used to compute the settings', 'type': 'string'}, 'computation_version': {'description': 'the version of the class used to compute the settings', 'type': 'string'}, 'crystal_type': {'description': 'The crystal type, as designated by CRYSTAL17', 'maximum': 6, 'minimum': 1, 'type': 'integer'}, 'kinds': {'additionalProperties': False, 'description': 'settings for input properties of each species kind', 'properties': {'fixed': {'description': 'kinds with are fixed in position for optimisations (set by FRAGMENT)', 'items': {'type': 'string', 'uniqueItems': True}, 'type': 'array'}, 'ghosts': {'description': 'kinds which will be removed, but their basis set are left (set by GHOSTS)', 'items': {'type': 'string', 'uniqueItems': True}, 'type': 'array'}, 'spin_alpha': {'description': 'kinds with initial alpha (+1) spin (set by ATOMSPIN)', 'items': {'type': 'string', 'uniqueItems': True}, 'type': 'array'}, 'spin_beta': {'description': 'kinds with initial beta (-1) spin (set by ATOMSPIN)', 'items': {'type': 'string', 'uniqueItems': True}, 'type': 'array'}}, 'type': 'object'}, 'operations': {'description': 'symmetry operations to use (in the fractional basis)', 'items': {'description': 'each item should be a list of [r00,r10,r20,r01,r11,r21,r02,r12,r22,t0,t1,t2]', 'items': {'maximum': 1, 'minimum': -1, 'type': 'number'}, 'maxItems': 12, 'minItems': 12, 'type': 'array'}, 'type': ['null', 'array']}, 'space_group': {'description': 'Space group number (international)', 'maximum': 230, 'minimum': 1, 'type': 'integer'}, 'symmetry_program': {'description': 'the program used to generate the symmetry', 'type': 'string'}, 'symmetry_version': {'description': 'the version of the program used to generate the symmetry', 'type': 'string'}}, 'required': ['space_group', 'crystal_type', 'centring_code', 'operations'], 'title': 'CRYSTAL17 structure symmetry settings', 'type': 'object'}
num_symops
set_data(data)[source]

Replace the current data with another one.

Parameters:data – The dictionary to set.
space_group