@@ -104,8 +104,12 @@ def test_write_input_file(self):
104104 self .job_1 .write_input_file ()
105105 with open (os .path .join (self .job_1 .local_path , input_filenames [self .job_1 .job_adapter ]), 'r' ) as f :
106106 content_1 = f .read ()
107- job_1_expected_input_file = """!uHF dlpno-ccsd(t) def2-tzvp def2-tzvp/c tightscf normalpno
108- !sp
107+ job_1_expected_input_file = """!uHF dlpno-ccsd(t) def2-tzvp tightscf normalpno
108+ !sp
109+
110+ %basis
111+ AuxC "def2-tzvp/c"
112+ end
109113
110114%maxcore 1792
111115%pal nprocs 8 end
@@ -130,8 +134,12 @@ def test_write_input_file_with_SMD_solvation(self):
130134 self .job_2 .write_input_file ()
131135 with open (os .path .join (self .job_2 .local_path , input_filenames [self .job_2 .job_adapter ]), 'r' ) as f :
132136 content_2 = f .read ()
133- job_2_expected_input_file = """!uHF dlpno-ccsd(t) def2-tzvp def2-tzvp/c tightscf normalpno
134- !sp
137+ job_2_expected_input_file = """!uHF dlpno-ccsd(t) def2-tzvp tightscf normalpno
138+ !sp
139+
140+ %basis
141+ AuxC "def2-tzvp/c"
142+ end
135143
136144%maxcore 1792
137145%pal nprocs 8 end
@@ -163,8 +171,12 @@ def test_write_input_file_with_CPCM_solvation(self):
163171 self .job_3 .write_input_file ()
164172 with open (os .path .join (self .job_3 .local_path , input_filenames [self .job_3 .job_adapter ]), 'r' ) as f :
165173 content_3 = f .read ()
166- job_3_expected_input_file = """!uHF dlpno-ccsd(t) def2-tzvp def2-tzvp/c tightscf normalpno
167- !sp
174+ job_3_expected_input_file = """!uHF dlpno-ccsd(t) def2-tzvp tightscf normalpno
175+ !sp
176+
177+ %basis
178+ AuxC "def2-tzvp/c"
179+ end
168180
169181%maxcore 1792
170182%pal nprocs 8 end
@@ -189,7 +201,7 @@ def test_write_input_file_with_CPCM_solvation(self):
189201 self .assertEqual (content_3 , job_3_expected_input_file )
190202
191203 def test_write_input_file_f12_with_cabs (self ):
192- """F12 sp_level with a cabs basis emits the CABS token on the ! line ."""
204+ """F12 sp_level with a cabs basis emits the AuxC and CABS tokens in a %basis block ."""
193205 job_f12 = OrcaAdapter (execution_type = 'queue' ,
194206 job_type = 'sp' ,
195207 level = Level (method = 'DLPNO-CCSD(T)-F12' ,
@@ -208,8 +220,13 @@ def test_write_input_file_f12_with_cabs(self):
208220 bang_line = content .splitlines ()[0 ]
209221 self .assertIn ('dlpno-ccsd(t)-f12' , bang_line )
210222 self .assertIn ('cc-pvtz-f12' , bang_line )
211- self .assertIn ('aug-cc-pvtz/c' , bang_line )
212- self .assertIn ('cc-pvtz-f12-cabs' , bang_line )
223+ # Aux and CABS must NOT be on the ! line (ORCA rejects them there), only the orbital basis.
224+ self .assertNotIn ('aug-cc-pvtz/c' , bang_line )
225+ self .assertNotIn ('cabs' , bang_line .lower ())
226+ # They must appear inside a %basis block instead.
227+ self .assertIn ('%basis' , content )
228+ self .assertIn ('AuxC "aug-cc-pvtz/c"' , content )
229+ self .assertIn ('CABS "cc-pvtz-f12-cabs"' , content )
213230
214231 def test_write_input_file_f12_without_cabs_raises (self ):
215232 """F12 sp_level without a cabs basis raises at input-file generation."""
0 commit comments