Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observables #64

Merged
merged 31 commits into from May 10, 2023
Merged

Observables #64

merged 31 commits into from May 10, 2023

Conversation

yomichi
Copy link
Contributor

@yomichi yomichi commented Mar 30, 2023

Users can define observables to be calculated by using [observer] section as the following example:

[observer]
[observer.similarity]
reference_structure = './MgAl2O4.vasp'
ignored_species = ["O"]

[[observer.solver]]
name = "magnetization"
type = 'aenet'
path= '~/opt/aenet/bin/predict.x_serial'
base_input_dir = './baseinput_mag'
perturb = 0.0
run_scheme = 'subprocess'
ignore_species = ["O"]

"Similarity" is how much the ratio of atoms in the same place as the reference configuration is. The similarity is calculated for each element, e.g., similarity_Mg.dat and similarity_Al.dat.

observer.solver takes the same input parameters as sampling.solver except for name which specifies the name of the result file.

In this PR, a new solver user is implemented. It takes a keyword function specifying a solver function from pymatgen.core.Structure to float. The function can be in some package, say, function = "mypackage.mymodule.myfunction". The module mypackage.mymodule will be automatically imported (at the time, the current directory is added to the module search path, and so ./mypackage.py is loaded).

@yomichi yomichi requested a review from skasamatsu March 31, 2023 10:43
@yomichi
Copy link
Contributor Author

yomichi commented May 10, 2023

I found that pymatgen 2023.5.8 does not work for our unit test.
We will limit the supported versions to before it for a while.

@yomichi yomichi merged commit f377ce7 into develop May 10, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants