mirror of https://github.com/phonopy/phono3py.git
Update pypolymlp example
This commit is contained in:
parent
b2309d69a3
commit
5146070780
|
@ -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
|
||||
```
|
|
@ -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")
|
Loading…
Reference in New Issue