-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into primitive
- Loading branch information
Showing
7 changed files
with
444 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ dependencies: | |
- scipy =1.11.2 | ||
- spglib =2.0.2 | ||
- sqsgenerator =0.2 | ||
- pyxtal =0.5.9 | ||
- pyxtal =0.6.0 |
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
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
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,36 @@ | ||
def phonopy_to_atoms(ph_atoms): | ||
""" | ||
Convert Phonopy Atoms to ASE-like Atoms | ||
Args: | ||
ph_atoms: Phonopy Atoms object | ||
Returns: ASE-like Atoms object | ||
""" | ||
from ase.atoms import Atoms | ||
|
||
return Atoms( | ||
symbols=list(ph_atoms.get_chemical_symbols()), | ||
positions=list(ph_atoms.get_positions()), | ||
cell=list(ph_atoms.get_cell()), | ||
pbc=True, | ||
) | ||
|
||
|
||
def atoms_to_phonopy(atom): | ||
""" | ||
Convert ASE-like Atoms to Phonopy Atoms | ||
Args: | ||
atom: ASE-like Atoms | ||
Returns: | ||
Phonopy Atoms | ||
""" | ||
from phonopy.structure.atoms import PhonopyAtoms | ||
|
||
return PhonopyAtoms( | ||
symbols=list(atom.get_chemical_symbols()), | ||
scaled_positions=list(atom.get_scaled_positions()), | ||
cell=list(atom.get_cell()), | ||
) |
Oops, something went wrong.