MDStoreUtils module

MDStoreUtils.CommitAndClose(backend)[source]

Commit pending changes and close the database backend.

Parameters:

backend – Database backend connection object providing commit() and close().

Return type:

None

MDStoreUtils.saveMDAbadParameters(store, defect_key, depth, expansion_factor, defect_index, lattice_constant)[source]

Save an DBClasses.MDAbadParameters entry to the database.

Parameters:
  • store (SqlStore) – Store object connected to the backend database.

  • defect_key (str or int) – Defect key identifier stored as key.

  • depth (float) – Defect depth metric (typically along the z-direction).

  • expansion_factor (float) – Relative expansion measure used to detect unstable/”exploded” runs.

  • defect_index (int) – Index of the defect atom.

  • lattice_constant (float) – Lattice constant metric used in later analysis.

Return type:

None

MDStoreUtils.saveMDDefectCell(store, host_name, defect_name, defect_key, structure)[source]

Save an DBClasses.MDDefectCell entry to the database.

Parameters:
  • store (SqlStore) – Store object connected to the backend database.

  • host_name (str) – Name/identifier of the host material.

  • defect_name (str) – Name/identifier of the defect configuration.

  • defect_key (str or int) – Defect key identifier. Converted to int before storing.

  • structure – Defect structure object stored in the defect_structure field.

Return type:

None

MDStoreUtils.saveMDScreenResult(store, defect_key, total_energy)[source]

Save an DBClasses.MDScreenResult entry to the database.

Parameters:
  • store (SqlStore) – Store object connected to the backend database.

  • defect_key (str or int) – Defect key identifier. Converted to int before storing.

  • total_energy (float) – Total energy value stored as total_energy_coarse.

Return type:

None