18
18
parser .add_argument ("-T" , "--temperature" , help = "Temperature of system (default = 300)" , type = float , nargs = "?" , default = 300 )
19
19
parser .add_argument ("-p" , "--density" , help = "Density of system (default = 0.03342285869 [for water])" , type = float , nargs = "?" , default = 3.3422858685000001E-02 )
20
20
#parser.add_argument("-t", "--tags", help="Suffix tags for scanning the correct .dx files (default = [\"H\", \"C\", \"G\"])", nargs="+", default=["H", "C", "G"])
21
+ parser .add_argument ("-n" , "--term" , help = "The values for n in the PSE-n closure" , required = False )
21
22
args = parser .parse_args ()
22
23
23
24
def epilogue (output_sfed , sample_grid , fname ):
@@ -36,9 +37,15 @@ def epilogue(output_sfed, sample_grid, fname):
36
37
epilogue (output_sfed , grids .grids ["HO" ], args .output )
37
38
elif args .closure == "GF" :
38
39
output_sfed = sfed_gf_3drism (grids .grids ["HO" ].grid , grids .grids ["CO" ].grid , grids .grids ["HH1" ].grid , grids .grids ["CH1" ].grid , rho = args .density , T = args .temperature )
39
- epilogue (output_sfed , grids .grids ["HO" ]. grid , args .output )
40
+ epilogue (output_sfed , grids .grids ["HO" ], args .output )
40
41
elif args .closure == "HNC" :
41
42
output_sfed = sfed_hnc_3drism (grids .grids ["HO" ].grid , grids .grids ["CO" ].grid , grids .grids ["HH1" ].grid , grids .grids ["CH1" ].grid , rho = args .density , T = args .temperature )
42
- epilogue (output_sfed , grids .grids ["HO" ].grid , args .output )
43
+ epilogue (output_sfed , grids .grids ["HO" ], args .output )
44
+ elif args .closure .startswith ("PSE" ):
45
+ if args .term is None :
46
+ parser .error ("PSE-n closure requires a value for -n" )
47
+ else :
48
+ output_sfed = sfed_psen_3drism (grids .grids ["HO" ].grid , grids .grids ["CO" ].grid , grids .grids ["HH1" ].grid , grids .grids ["CH1" ].grid , grids .grids ["UO" ].grid ,grids .grids ["UH1" ].grid , float (args .term ), rho = args .density , T = args .temperature )
49
+ epilogue (output_sfed , grids .grids ["HO" ], args .output )
43
50
else :
44
51
raise Exception ("Unknown closure" )
0 commit comments