Dissociation curve¶
The Dissociation
class allows to perform all the jobs
necessary to obtain the dissociation curve between two fragments (sub-
systems).
-
class
mybigdft.workflows.dissociation.
Dissociation
(fragment1, fragment2, distances, inputparams=None, name='', run_dir=None)[source]¶ Bases:
mybigdft.workflows.workflow.AbstractWorkflow
This workflow allows to get all the necessary data in order to plot a dissociation curve of two fragments (or sub-systems). This curve represent how the energy of the whole system is modified when the distance between the two fragments varies.
The fragments will be separated from each other in the \(y\) direction according to a set of distances.
A queue of
Job
instances is initialized, one per distance between the fragments. For each job, the system is made of both fragments, where each atom of the second fragment is translated along the \(y\) direction by the value of the distance.Warning
If both fragments do not have the same boundary conditions or cell, it is the ones of the first fragment that are used.
Note
The \(y\) axis was chosen so that surface boundary conditions could be used as well (for instance, the first fragment can be a surface while the second is an atom or molecule).
- Parameters
inputparams (InputParams) –
fragment1 (Posinp) – Posinp of the first fragment.
fragment2 (Posinp) – Posinp of the second fragment.
distances (list or numpy.array) – Distances between both fragments.
name (str) – Name to be used for each job.
- Raises
ValueError – If one fragment defines periodic boundary conditions.
-
property
energies
¶ - Returns
Total energy of each job in the queue.
- Return type
list
-
property
is_completed
¶ - Returns
True if all the post-processing attributes are no longer set to their default value.
- Return type
bool
-
property
logfiles
¶ - Returns
A dictionary of all the logfiles of the workflow, with the name of the associated job as key.
- Return type
dict
-
property
queue
¶ - Returns
All the jobs of the workflow.
- Return type
list
-
run
(nmpi=1, nomp=1, force_run=False, dry_run=False, restart_if_incomplete=False, timeout=None)¶ Run all the calculations if the post-processing was not already performed.
Warning
If force_run or dry_run is set to True, then any previous value of the post-processing attributes is deleted and set back to their default value, so that the post-processing is not considered as being performed.
- Parameters
nmpi (int) – Number of MPI tasks.
nomp (int) – Number of OpenMP tasks.
force_run (bool) – If True, the calculations are run even though a logfile already exists.
dry_run (bool) – If True, the input files are written on disk, but the bigdft-tool command is run instead of the bigdft one.
restart_if_incomplete (bool) – If True, the job is restarted if the existing logfile is incomplete.
timeout (float or int or None) – Number of minutes after which each job must be stopped.
- Warns
UserWarning – If the post-processing was already completed.