-
Notifications
You must be signed in to change notification settings - Fork 0
/
dhhelper
36 lines (34 loc) · 1.62 KB
/
dhhelper
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
def argument_parse():
global parser, args
parser=argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter,
description='Generate Gaussian iops for doubly hybrid functionals')
parser.add_argument("-t","--type",dest='type',metavar='type',type=str,default='',
required=True, choices=['dh','scf'],
help='scf: for SCF only (useful for stable=opt)\n'
' dh: for full functional (include SCF and PT2)')
parser.add_argument("-f","--fun",dest='xc',metavar='functional',type=str,
#default='',
required=True,
help = 'supported: B2PLYP MPW2PLYP PBE0DH PBEQIDH\n'
' PBE02 B2GPPLYP LS1DHPBE DSDPBEP86\n'
' DSDPBEP86D3 revDSDPBEP86D3 DSDPBEPBED3\n'
' DSDBLYPD3 DSDPBEB95D3 B2PLYPD3\n'
'Attention: No hyphens in functional name\n')
parser.add_argument("-v", "--version",action="version",version='v1.0.220427')
args=parser.parse_args()
import argparse
from geninp import gau_scf, gau_dh
try:
argument_parse()
except Exception as e:
#print(e)
parser.print_help()
exit()
if args.type == 'scf':
gau_scf(args.xc)
elif args.type == 'dh':
gau_dh(args.xc)
#else:
# print('->> Please use -t parameter choose a type first! <<-\n'
# ' scf: for SCF only (useful for stable=opt)\n'
# ' dh: for full functional (include SCF and PT2)')