forked from SSCHAcode/CellConstructor
-
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.
Fixed the error on the atoms when we load the same structure multiple…
… times
- Loading branch information
1 parent
1f005cc
commit 85cf495
Showing
4 changed files
with
112 additions
and
19 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
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,31 @@ | ||
#!python | ||
|
||
import cellconstructor as CC, cellconstructor.Structure, cellconstructor.Manipulate | ||
import ase, ase.visualize | ||
import sys, os | ||
|
||
|
||
def print_info(): | ||
TXT = """ | ||
This script is part of CellConstructor. | ||
Display with ASE the scf file format. | ||
Usage: | ||
view_scf_atoms.py filename.scf | ||
filename.scf is the file containing the structure in scf format. | ||
scf format can be saved from cellconstructor.Structure.Structure class | ||
with the method save_scf. | ||
Or generated by the python-sscha package. | ||
""" | ||
print(TXT) | ||
|
||
if __name__ == "__main__": | ||
if not len(sys.argv) == 2: | ||
print_info() | ||
exit() | ||
|
||
all_s = CC.Manipulate.load_scf_trajectory(sys.argv[1]) | ||
all_atms = [x.get_ase_atoms() for x in all_s] | ||
|
||
ase.visualize.view(all_atms) |
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