Skip to content

Commit

Permalink
more general method of parsing CIF
Browse files Browse the repository at this point in the history
  • Loading branch information
mk01071 committed Jun 1, 2021
1 parent 1bd6745 commit f3a9f06
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/module_amp2_input.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
####################################
# Modifier : yybbyb@snu.ac.kr #
# data : 2019-08-08 #
# data : 2021-06-01 #
####################################
# This is a package of modules for generating input files for VASP from structure file.
import os, sys, yaml, shutil, glob, math, subprocess
Expand Down Expand Up @@ -127,14 +127,19 @@ def make_poscar_from_cif(cif,target):

### read symmetry information
# from ICSD cif
if "_symmetry_equiv_pos_as_xyz" in line :
if "_symmetry_equiv_pos_as_xyz" in line or "_space_group_symop_operation_xyz" in line :
sym = []
while True :
tmp = f.readline()
tmp = tmp.replace('\n','').replace('\r','')
if not "'" in tmp:
if "loop_" in tmp:
line=tmp
break
elif not len(tmp.split()) > 0:
continue
elif not "'" in tmp:
continue
break
tmp = tmp.split("'")[1]
tmp = tmp.replace(" ","")
tmp = tmp.replace("/",".0/")
Expand Down

0 comments on commit f3a9f06

Please # to comment.