Jobschnet¶
The Jobschnet
class is the base class defining a SchnetPack calculation.
-
class
mybigdft.jobschnet.
Jobschnet
(name='', posinp=None)[source]¶ Bases:
object
This class defines a SchnetPack calculation similarly to the Job class for BigDFT.
- Parameters
name (str) – Name of the job. Will be used to name the created files.
posinp (Posinp) – Base atomic positions for the job
-
property
name
¶ - Returns
Base name of the calculation used to set the names of files and directories.
- Return type
str
-
property
number_of_structures
¶ - Returns
Number of different structures when the job is declared
- Return type
int
-
property
logfile
¶ - Returns
Object empty or containing the results of the calculation.
- Return type
-
property
outfile_name
¶ - Returns
Name of the output file
- Return type
str
-
run
(model_dir=None, forces=False, device='cpu', write_to_disk=False, batch_size=128, overwrite=False)[source]¶ - Parameters
model_dir (str) – Absolute path to the SchnetPack model to use in calculation
forces (int or bool) – Order of the force calculations (0, 1 or 2) If 0 (or False), forces are not evaluated. If 1, forces are evaluated on first-order (6N calculations) If 2 (or True), forces are evaluated on second-order (12N calculations)
device (str) – Either ‘cpu’ or ‘cuda’ to run on cpu or gpu
write_to_disk (bool) – If True, an outfile will be written after the calculation.
batch_size (int) – Size of the mini-batches used in predictions
overwrite (bool) – If True, all .db files are removed from the directory before the calculation is done.
-
class
mybigdft.jobschnet.
Logfileschnet
(posinp)[source]¶ Bases:
object
Container class to emulate the Logfile object used in BigDFT calculations
-
property
posinp
¶ - Returns
List containing the base Posinp objects for the predictions.
- Return type
list of Posinps
-
property
n_at
¶ - Returns
List containing the number of atoms of each structure.
- Return type
list of ints
-
property
atom_types
¶ - Returns
List containing sets of the elements present in each structure.
- Return type
list of sets
-
property
boundary_conditions
¶ - Returns
List containing the boundary conditions, either free, surface or periodic, of each structure.
- Return type
list of strings
-
property
cell
¶ - Returns
List containing cell dimensions of each structure, None for free boundary conditions.
- Return type
list of lists of floats
-
property
energy
¶ - Returns
List containing the energy value for each structure. If None, the energies have not been calculated yet.
- Return type
list of floats or None
-
property
forces
¶ - Returns
List containing the forces values for each structure. If None, the forces have not been calculated yet.
- Return type
list of arrays of floats or None
-
property
dipole
¶ - Returns
List containing the dipole values for each structure. If None, the dipoles have not been calculated yet.
- Return type
list of arrays of floats or None
-
property