Skip to content

Commit

Permalink
Changed for a better fix for the custom basis set bug
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelRobidas committed Feb 2, 2023
1 parent 7df0cee commit bc3344d
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ccinput/calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def __init__(
dict_cbs = {}

for _entry in custom_basis_sets.split(";"):
entry = _entry.strip()
entry = _entry.replace(" ", "")
if entry == "":
continue
sentry = entry.split("=")
Expand Down
81 changes: 81 additions & 0 deletions ccinput/tests/test_gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -1489,6 +1489,87 @@ def test_gen_bs_space(self):

self.assertTrue(self.is_equivalent(REF, inp.input_file))

def test_gen_bs_space_middle(self):
params = {
"nproc": 8,
"mem": "10000MB",
"type": "Geometrical Optimisation",
"file": "ethanol.xyz",
"software": "Gaussian",
"charge": "0",
"method": "B3LYP",
"basis_set": "6-31+G(d,p)",
"custom_basis_sets": "O = Def2 -T ZVPD;",
}

inp = self.generate_calculation(**params)

REF = """
%chk=ethanol.chk
%nproc=8
%mem=10000MB
#p opt B3LYP/Gen
File created by ccinput
0 1
C -1.31970 -0.64380 0.00000
H -0.96310 -1.65260 0.00000
H -0.96310 -0.13940 -0.87370
H -2.38970 -0.64380 0.00000
C -0.80640 0.08220 1.25740
H -1.16150 1.09160 1.25640
H -1.16470 -0.42110 2.13110
O 0.62360 0.07990 1.25870
H 0.94410 0.53240 2.04240
C H 0
6-31+G(d,p)
****
O 0
S 6 1.00
27032.3826310 0.21726302465D-03
4052.3871392 0.16838662199D-02
922.32722710 0.87395616265D-02
261.24070989 0.35239968808D-01
85.354641351 0.11153519115
31.035035245 0.25588953961
S 2 1.00
12.260860728 0.39768730901
4.9987076005 0.24627849430
S 1 1.00
1.1703108158 1.0000000
S 1 1.00
0.46474740994 1.0000000
S 1 1.00
0.18504536357 1.0000000
S 1 1.00
0.70288026270D-01 1.0000000
P 4 1.00
63.274954801 0.60685103418D-02
14.627049379 0.41912575824D-01
4.4501223456 0.16153841088
1.5275799647 0.35706951311
P 1 1.00
0.52935117943 .44794207502
P 1 1.00
0.17478421270 .24446069663
P 1 1.00
0.51112745706D-01 1.0000000
D 1 1.00
2.31400000 1.0000000
D 1 1.00
0.64500000 1.0000000
D 1 1.00
0.14696477366 1.0000000
F 1 1.00
1.42800000 1.0000000
****
"""

self.assertTrue(self.is_equivalent(REF, inp.input_file))

def test_irrelevant_gen_bs(self):
params = {
"nproc": 8,
Expand Down

0 comments on commit bc3344d

Please sign in to comment.