3
0
mirror of https://github.com/NehZio/Crystal-MEC synced 2024-09-27 03:51:07 +02:00

Prevention

This commit is contained in:
Léo Gaspard 2019-05-02 11:50:56 +02:00
parent 874d0e5d3f
commit 54c319c4e2
2 changed files with 7 additions and 7 deletions

View File

@ -621,9 +621,9 @@ def main():
read_input(sys.argv[1])
nA = int(np.floor(2*rBath/a)+2) #We chose the number of time we need to replicate
nB = int(np.floor(2*rBath/(b*np.sin(np.radians(gamma))))+2) #to be able to cut the bath
nC = int(np.floor(2*rBath/(c*np.sin(np.radians(beta))))+2)
nA = int(np.floor(2*rBath/a)+3) #We chose the number of time we need to replicate
nB = int(np.floor(2*rBath/(b*np.sin(np.radians(gamma))))+3) #to be able to cut the bath
nC = int(np.floor(2*rBath/(c*np.sin(np.radians(beta))))+3)
coords = big_cell(nA,nB,nC)
@ -726,6 +726,10 @@ def main():
g.close()
os.system('avogadro tmp.xyz')
os.system('rm tmp.xyz')
ch = 0
for i in range(len(coords)):
ch += coords[i][5]
print("Total charge : % 8.5f"%ch)
if sym != 'x':
@ -763,10 +767,6 @@ def main():
pp = [[i[0],i[1],i[2],i[3],i[5]] for i in pp]
bath = [[i[0],i[1],i[2],i[3],i[5]] for i in bath]
ch = 0
for i in range(len(coords)):
ch += coords[i][4]
print("Total charge : % 8.5f"%ch)
write_input(frag,pp,bath,output_file,sym)
if visu != 0:

Binary file not shown.