-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from BattModels/mkphuthi/develop
Mkphuthi/develop
- Loading branch information
Showing
299 changed files
with
2,396 additions
and
18,868 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
To build the documentation you will need the following packages: | ||
|
||
- sphinx | ||
- sphinx-apidoc | ||
- autodoc | ||
|
||
### Steps | ||
1. First, generate the autdoc sources for the API reference from the root using | ||
|
||
sphinx-apidoc -f -o docs asimtools | ||
|
||
2. Then go into the docs directory and run | ||
|
||
make html | ||
|
||
This will generate the docs in the `_build` directory | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
''' | ||
Generates a parity plot and collects evaluation statistics comparing energy | ||
and/or forces and/or stress to existing values in the provided dataset. This | ||
script can work in parallel based on the number of cores specified. | ||
asimmodule can work in parallel based on the number of cores specified. | ||
Author: [email protected] | ||
|
2 changes: 1 addition & 1 deletion
2
asimtools/scripts/do_nothing.py → asimtools/asimmodules/do_nothing.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#!/usr/bin/env python | ||
''' | ||
Describe the script briefly here. If this is a script that runs multiple steps, | ||
Describe the asimmodule briefly here. If this is a asimmodule that runs multiple steps, | ||
describe it here using reStructuredText to generate autodocs | ||
Cite the papers where the method/script was first introduced here as well | ||
Cite the papers where the method/asimmodule was first introduced here as well | ||
Author: [email protected] | ||
''' | ||
|
@@ -17,10 +17,9 @@ | |
from asimtools.utils import ( | ||
get_atoms, | ||
) | ||
from asimtools.scripts.ase_cubic_eos_optimization import ( | ||
from asimtools.asimmodules.geometry_optimization.ase_cubic_eos_optimization import ( | ||
ase_cubic_eos_optimization as eos | ||
) | ||
from asimtools.scripts.cell_relax import cell_relax | ||
|
||
def get_strained_atoms(atoms, strain: str, delta: float): | ||
"""Returns a unit cell with atoms strained according to some useful types | ||
|
@@ -84,7 +83,7 @@ def cubic_energy_expansion( | |
calc_id: str, | ||
image: Dict, | ||
deltas: Sequence[float] = (-0.01,-0.0075,-0.005,0.00,0.005,0.0075,0.01), | ||
ase_eos_args: Optional[Dict] = None, | ||
ase_cubic_eos_args: Optional[Dict] = None, | ||
) -> Dict: | ||
''' | ||
Calculates B, C11, C12 and C44 elastic constants of a structure with cubic | ||
|
@@ -98,8 +97,8 @@ def cubic_energy_expansion( | |
# Start by getting the Bulk modulus and optimized cell from the EOS | ||
logging.info('Calculating EOS') | ||
eos_kwargs = {'image': image, 'calc_id': calc_id} | ||
if ase_eos_args is not None: | ||
eos_kwargs.update(ase_eos_args) | ||
if ase_cubic_eos_args is not None: | ||
eos_kwargs.update(ase_cubic_eos_args) | ||
eos_results = eos(**eos_kwargs) | ||
B = eos_results['B'] | ||
atoms = get_atoms(image_file='eos_image_output.xyz') | ||
|
@@ -135,7 +134,7 @@ def cubic_energy_expansion( | |
c11min12_atoms.write(f's{delta:.4f}_c11min12.xyz') | ||
|
||
def f(x, a, b, c): | ||
''' Fitting function for Free energy expansion to second order''' | ||
''' Fitting function for free energy expansion to second order''' | ||
return a*x**2 + b*x + c | ||
|
||
logging.info('Fitting for C44') | ||
|
@@ -152,13 +151,15 @@ def f(x, a, b, c): | |
anis = 2 * C44 / (C11 - C12) | ||
|
||
results = { | ||
'B': float(B / GPa), | ||
'C11minC12': float(C11minC12 / GPa), | ||
'C11': float(C11 / GPa), | ||
'C12': float(C12 / GPa), | ||
'C44': float(C44 / GPa), | ||
'Anisotropy': float(anis), | ||
'vol': float(atoms.get_volume()), | ||
'constants': { | ||
'B': float(B / GPa), | ||
'C11minC12': float(C11minC12 / GPa), | ||
'C11': float(C11 / GPa), | ||
'C12': float(C12 / GPa), | ||
'C44': float(C44 / GPa), | ||
'Anisotropy': float(anis), | ||
'vol': float(atoms.get_volume()), | ||
}, | ||
} | ||
|
||
return results # Always return a dictionary! Use {} if necessary |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.