From 450a80e3078d695c931386044ddcd1451b1eaacd Mon Sep 17 00:00:00 2001 From: eginer Date: Mon, 3 Apr 2023 14:32:25 +0200 Subject: [PATCH] fixed stupid problem in pt_charges --- src/nuclei/write_pt_charges.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/nuclei/write_pt_charges.py b/src/nuclei/write_pt_charges.py index 6dbcd5b8..f5007090 100644 --- a/src/nuclei/write_pt_charges.py +++ b/src/nuclei/write_pt_charges.py @@ -21,7 +21,7 @@ def mv_in_ezfio(ezfio,tmp): os.system(cmdmv) -# Getting the EZFIO + ##Getting the EZFIO EZFIO=sys.argv[1] EZFIO=EZFIO.replace("/", "") print(EZFIO) @@ -66,8 +66,20 @@ zip_in_ezfio(EZFIO,tmp) tmp="pts_charge_coord" fcoord = open(tmp,'w') fcoord.write(" 2\n") -fcoord.write(" "+str(n_charges)+' 3\n') -#fcoord.write(" "+' 3 '+str(n_charges)+' \n') +if(n_charges < 10): + fcoord.write(" "+str(n_charges)+' 3\n') +elif(n_charges <100): + fcoord.write(" "+str(n_charges)+' 3\n') +elif(n_charges <1000): + fcoord.write(" "+str(n_charges)+' 3\n') +elif(n_charges <10000): + fcoord.write(" "+str(n_charges)+' 3\n') +elif(n_charges <100000): + fcoord.write(" "+str(n_charges)+' 3\n') +elif(n_charges <1000000): + fcoord.write(" "+str(n_charges)+' 3\n') +elif(n_charges <10000000): + fcoord.write(" "+str(n_charges)+' 3\n') for i in range(n_charges): fcoord.write(' '+coord_x[i]+'\n') for i in range(n_charges):