diff --git a/example/NaCl-pypolymlp/README.md b/example/NaCl-pypolymlp/README.md new file mode 100644 index 00000000..438d9c82 --- /dev/null +++ b/example/NaCl-pypolymlp/README.md @@ -0,0 +1,9 @@ +# Example to create force constants using MLPs by pypolymlp + +This is an example to follow the documentation +https://phonopy.github.io/phono3py/pypolymlp.html. +`phono3py_params.yaml` can be also generated by + +```bash +% python make_phono3py_params.py ../NaCl-rd/phono3py_params_NaCl.yaml.xz +``` diff --git a/example/NaCl-pypolymlp/make_phono3py_params.py b/example/NaCl-pypolymlp/make_phono3py_params.py new file mode 100644 index 00000000..2aeec2cf --- /dev/null +++ b/example/NaCl-pypolymlp/make_phono3py_params.py @@ -0,0 +1,13 @@ +import sys + +import phono3py + +ph3 = phono3py.load(sys.argv[1], produce_fc=False, log_level=1) +ph3_new = phono3py.Phono3py( + ph3.unitcell, + supercell_matrix=ph3.supercell_matrix, + primitive_matrix=ph3.primitive_matrix, +) +ph3_new.dataset = ph3.dataset +ph3_new.nac_params = ph3.nac_params +ph3_new.save("phono3py_params.yaml")