1414 E-mail: zl.liu@163.com, cekuma1@gmail.com
1515
1616"""
17+ from spglib import spglib
1718from read_input import indict
1819
19-
2020def findspg (atoms ):
2121 spg0 = spglib .get_spacegroup (atoms , symprec = 0.1 )
2222 if spg0 :
@@ -30,24 +30,29 @@ def findspg(atoms):
3030
3131
3232def find_crystal_system (pos_conv , dimensional ,tubestrain_type ):
33+
3334 if dimensional == '1D' :
34- # latt_system = 'any1D'
35-
35+ latt_system = 'any1D' # Default value
3636 dist_acc = 0.1
3737 lenth_angl = pos_conv .get_cell_lengths_and_angles ()
3838 a = lenth_angl [0 ]
3939 b = lenth_angl [1 ]
4040 c = lenth_angl [2 ]
41- # print('These are the lattice constants ', a, b, c)
42- # The 1D lattice system is defined according to their spatial
43- # configuration
44- if tubestrain_type == "Longitudinal" :
45- latt_system = 'any1D' # This is 1D embedded in 3D space
46- elif tubestrain_type == "Generalized" :
41+
42+
43+ if tubestrain_type == "Generalized" :
4744 latt_system = 'Nanotube' # This is 1D embedded in 3D space
45+
46+ elif tubestrain_type == "AxialShear" :
47+ latt_system = 'AxialShear'
48+
49+ elif tubestrain_type == "AxialLite" :
50+ latt_system = 'any1D'
51+ elif tubestrain_type == "Axial" :
52+ latt_system = 'Axial'
4853 else :
4954 print ('ERROR: Define appropriate nanotube structure!!!\n ' )
50- #latt_system = 'any1D' # This is a "pure" 1D system
55+
5156
5257 elif dimensional == '2D' :
5358 dist_acc = 0.1
@@ -59,8 +64,7 @@ def find_crystal_system(pos_conv, dimensional,tubestrain_type):
5964 c = lenth_angl [2 ]
6065 gamma = lenth_angl [5 ]
6166
62- # The 2D lattice system is defined according to 2D Mater. 6 (2019)
63- # 048001
67+ # The 2D lattice system is defined according to 2D Mater. 6 (2019) 048001
6468 if c > a and c > b :
6569 if abs (a - b ) <= dist_acc :
6670 if abs (
0 commit comments