abics.applications.latgas_abinitio_interface.model_setup module¶
-
class
abics.applications.latgas_abinitio_interface.model_setup.
ObserverParams
[source]¶ Bases:
object
-
classmethod
from_dict
(d)[source]¶ - Parameters
d (dict) – Dictionary
- Returns
oparams – self
- Return type
-
classmethod
-
abics.applications.latgas_abinitio_interface.model_setup.
base_structure
(lat, dict_str)[source]¶ - Parameters
lat (pymatgen.Lattice) –
dict_str (dict) – Dictionary of base structure
- Returns
st
- Return type
pymatgen.Structure
-
class
abics.applications.latgas_abinitio_interface.model_setup.
config
(base_structure, defect_sublattices, num_defects, cellsize=[1, 1, 1], perfect_structure=None)[source]¶ Bases:
object
This class defines the config with lattice gas mapping
- Parameters
base_structure (pymatgen.Structure) – Structure of base sites (unsampled sites)
defect_sublattices (defect_sublattice) – Structure of defects (sampled sites)
num_defects (dict) – {group name: number of defects}
cellsize (list, optional) – Cell size, by default [1, 1, 1]
perfect_structure (pymatgen.Structure, optional) – Strucure of all sites (union of base and defect), by default None
-
__init__
(base_structure, defect_sublattices, num_defects, cellsize=[1, 1, 1], perfect_structure=None)[source]¶ - Parameters
base_structure (pymatgen.Structure) – Structure of base sites (unsampled sites)
defect_sublattices (defect_sublattice) – Structure of defects (sampled sites)
num_defects (dict) – {group name: number of defects}
cellsize (list, optional) – Cell size, by default [1, 1, 1]
perfect_structure (pymatgen.Structure, optional) – Strucure of all sites (union of base and defect), by default None
-
count
(group_name, orientation)[source]¶ - Parameters
group_name (str) – The name of the group
orientation –
-
defect_sublattice_structure
(sublat_id)[source]¶ - Parameters
sublat_id (int) – index of sublattice
- Returns
sublattice_structure – sublattice structure object
- Return type
pymatgen.Structure
-
property
vacancy_structure
¶
-
class
abics.applications.latgas_abinitio_interface.model_setup.
defect_sublattice
(site_centers, groups)[source]¶ Bases:
object
- Parameters
site_centers (list) – Center coordinates at each groups
groups (list) – List of groups
-
class
abics.applications.latgas_abinitio_interface.model_setup.
dft_latgas
(abinitio_run, save_history=True, l_update_basestruct=False, check_ion_move=False, ion_move_tol=0.7)[source]¶ Bases:
abics.mc.model
This class defines the DFT lattice gas mapping model
- Parameters
abinitio_run (runner object) – Runner (manager) of external solver program
save_history (boolean) –
l_update_basestruct (boolean) –
check_ion_move (boolean) –
ion_move_tol (float) –
-
__init__
(abinitio_run, save_history=True, l_update_basestruct=False, check_ion_move=False, ion_move_tol=0.7)[source]¶ - Parameters
abinitio_run (runner object) – Runner (manager) of external solver program
save_history (boolean) –
l_update_basestruct (boolean) –
check_ion_move (boolean) –
ion_move_tol (float) –
-
energy
(config)[source]¶ Calculate total energy
- Parameters
config (config object) – Configurations
- Returns
energy
- Return type
float
-
model_name
= 'dft_latgas'¶
-
class
abics.applications.latgas_abinitio_interface.model_setup.
energy_lst
(calcode, vasp_run, base_vaspinput, matcher_base, queen, reps, energy_lst, matcher=None)[source]¶ Bases:
abics.applications.latgas_abinitio_interface.model_setup.dft_latgas
- Parameters
calcode –
vasp_run (runner object) – Runner (manager) of external solver program
base_vaspinput –
matcher_base –
queen –
reps –
energy_lst (list) – Energy list
matcher –
-
abics.applications.latgas_abinitio_interface.model_setup.
gauss
(x, x0, sigma)[source]¶ Gaussian function
- Parameters
x (float) – The position
x0 (float) – The position of the center of the peak
sigma (float) – The standard deviation
- Returns
value
- Return type
float
-
class
abics.applications.latgas_abinitio_interface.model_setup.
group
(name, species, *, coords=None, relaxations=None, magnetizations=None)[source]¶ Bases:
object
- Parameters
name (str) – The name of atomic group
species (str) – The atomic species belonging to the atom group
coords (numpy array) – The coordinates of each atom in the atom group.
relaxations (numpy array) – Whether to perform structure optimization or not
magnetization (numpy array) – Magnetizations (inbalance of up/down spins)
-
__init__
(name, species, *, coords=None, relaxations=None, magnetizations=None)[source]¶ - Parameters
name (str) – The name of atomic group
species (str) – The atomic species belonging to the atom group
coords (numpy array) – The coordinates of each atom in the atom group.
relaxations (numpy array) – Whether to perform structure optimization or not
magnetization (numpy array) – Magnetizations (inbalance of up/down spins)
-
abics.applications.latgas_abinitio_interface.model_setup.
match_id
(lst, obj)[source]¶ Return the index list of lst which matches obj.
- Parameters
lst (list) –
obj (object) –
- Returns
- Return type
The index list of lst which matches obj.
-
abics.applications.latgas_abinitio_interface.model_setup.
match_latgas_group
(latgas_rep, group)[source]¶ Return the index list of latgas_rep which matches group.name.
- Parameters
latgas_rep (list) –
group (object) – Notes: the group must have name
- Returns
- Return type
The index list of latgas_rep which matches group.name.
-
abics.applications.latgas_abinitio_interface.model_setup.
nomatch_id
(lst, obj)[source]¶ Return the index list of lst which does not match obj.
- Parameters
lst (list) –
obj (object) –
- Returns
- Return type
The index list of lst which does not match obj.
-
abics.applications.latgas_abinitio_interface.model_setup.
perturb_structure
(st: pymatgen.core.structure.Structure, distance: float) → None[source]¶ Perform random perturbation of the atomic coordinates. All atoms will be moved at the same distance.
Which components will be perturbed is specified by a boolean array stored as st.site_properties[“seldyn”]. If not stored, all the components will be perturbed. Argument st will be mutated.
- Parameters
st (Structure) –
distance (float) – strength of perturb