Skip to content

Commit

Permalink
post meeting
Browse files Browse the repository at this point in the history
  • Loading branch information
fenneltheloon committed Jul 1, 2023
1 parent 43a1baa commit b2b3e1f
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 3 deletions.
19 changes: 19 additions & 0 deletions I-test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import pymatgen.io.vasp
import pymatgen.symmetry.analyzer

file_path = "I.vasp"
R_TOL = 0.5
A_TOL = 5.0

# Calculate and append spacegroup to the start of the file
poscar = pymatgen.io.vasp.inputs.Poscar\
.from_file(file_path, check_for_POTCAR=False, read_velocities=False)

# TODO: figure out why this is only returning 1. Ran 40k+ attempts, only
# returned 1 ever. Am I just not scanning enough input or is there actually
# a problem with the system?
spacegroup = pymatgen.symmetry.analyzer.\
SpacegroupAnalyzer(poscar.structure, symprec=R_TOL,\
angle_tolerance=A_TOL).get_space_group_number()

print(spacegroup)
62 changes: 62 additions & 0 deletions I.vasp
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Iodine lattice
1.0
12.8247900009 0.0000000000 0.0000000000
-6.4123950005 11.1065939390 0.0000000000
0.0000000000 0.0000000000 18.9468288422
I
54
Direct
0.222222313 0.111110995 0.081330003
0.222222309 0.444444322 0.081330003
0.222222333 0.777777702 0.081330003
0.555555683 0.111110995 0.081330003
0.555555680 0.444444322 0.081330003
0.555555704 0.777777702 0.081330003
0.888889016 0.111110995 0.081330003
0.888888976 0.444444322 0.081330003
0.888889000 0.777777702 0.081330003
0.111110999 0.222222332 0.918670028
0.111110993 0.555555692 0.918670028
0.111111011 0.888888986 0.918670028
0.444444351 0.222222332 0.918670028
0.444444345 0.555555692 0.918670028
0.444444345 0.888888986 0.918670028
0.777777684 0.222222332 0.918670028
0.777777660 0.555555692 0.918670028
0.777777678 0.888888986 0.918670028
0.111110999 0.222222332 0.414662995
0.111110993 0.555555692 0.414662995
0.111111011 0.888888986 0.414662995
0.444444351 0.222222332 0.414662995
0.444444345 0.555555692 0.414662995
0.444444345 0.888888986 0.414662995
0.777777684 0.222222332 0.414662995
0.777777660 0.555555692 0.414662995
0.777777678 0.888888986 0.414662995
-0.000000000 -0.000000000 0.252003026
0.000000002 0.333333338 0.252003026
0.000000004 0.666666675 0.252003026
0.333333333 -0.000000000 0.252003026
0.333333336 0.333333338 0.252003026
0.333333338 0.666666675 0.252003026
0.666666667 -0.000000000 0.252003026
0.666666669 0.333333338 0.252003026
0.666666671 0.666666675 0.252003026
0.000000000 0.000000000 0.747996974
0.000000002 0.333333338 0.747996974
0.000000004 0.666666675 0.747996974
0.333333333 0.000000000 0.747996974
0.333333336 0.333333338 0.747996974
0.333333338 0.666666675 0.747996974
0.666666667 0.000000000 0.747996974
0.666666669 0.333333338 0.747996974
0.666666671 0.666666675 0.747996974
0.222222313 0.111110995 0.585336980
0.222222309 0.444444322 0.585336980
0.222222333 0.777777702 0.585336980
0.555555683 0.111110995 0.585336980
0.555555680 0.444444322 0.585336980
0.555555704 0.777777702 0.585336980
0.888889016 0.111110995 0.585336980
0.888888976 0.444444322 0.585336980
0.888889000 0.777777702 0.585336980
8 changes: 6 additions & 2 deletions first-gen-filler.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ def chi(x):
BI_OCC = 9
AG_BI_AV = 27
I_AV_OCC = 54
SPACE_GROUPS = 230
R_TOL = 0.1
# Will not go up to 230 because of the type of crystal that we have
SPACE_GROUPS = 166
R_TOL = 0.5
A_TOL = 5.0

arg_parser = argparse.ArgumentParser()
Expand Down Expand Up @@ -177,6 +178,9 @@ def chi(x):
vasp_file.writelines(vflines)
vasp_file.close()

if spacegroup > 1:
sys.exit()

# Now determine the proper bin and move file into that bin.
for j in range(0, args.bins):
if spacegroup <= Bins[j]:
Expand Down
13 changes: 12 additions & 1 deletion notes/first-gen-filler.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,15 @@ where $a$, $i$, and $n$ mean the same the same thing, and $z$ this time refers t

## First Run
Traceback: zip object has no length. Look at parsing the element names form the
INDEX file
INDEX file

## Generating symmetry

Will need to verify symmetry for all occupied sites if doing manual generation

Check $\text{Ag, Bi, Cu}$ in that order - if we can quit early we should

### Test program specification
Read the book that I just downloaded
- Ethan will write a script that verifies the closedness of space group symmetry sets up to 166 (perhaps random sampling) - expect to invalidate a lot of groups
- Victor will script for the Iodine lattice and see if we can recreate it using space group 166 rules

0 comments on commit b2b3e1f

Please sign in to comment.