@@ -462,26 +462,27 @@ def test_write_mrci_input_file(self):
462462 def test_write_input_file_mrcc_routing (self ):
463463 """Methods unsupported by native Molpro but supported by MRCC are routed through the MRCC plugin.
464464
465- For an open-shell wavefunction, an additional ``{uccsd}`` step is
466- emitted between the HF block and the MRCC plugin call. Molpro defaults
467- to ROHF for open-shell HF, but MRCC's approximate-CC family
468- (``CCSDT``, ``CCSDT(Q )``, ``CCSDTQ``, ``CCSDTQ(P )``) refuses standard
469- ROHF orbitals with the error::
465+ For an open-shell wavefunction, the SCF reference is switched from
466+ ``{hf;...}`` (which gives Molpro's ROHF for open-shell) to
467+ ``{uhf;...}``. MRCC's approximate-CC family (``CCSDT(Q)``,
468+ ``CCSDTQ(P )``, and the perturbative-``(T )`` variants ) refuses
469+ standard ROHF orbitals with the error::
470470
471471 Approximate CC methods are not implemented for standard ROHF orbitals!
472472 Use semicanonical orbitals!
473473
474- Running ``{uccsd}`` on the ROHF reference produces the semicanonical
475- orbitals MRCC needs as a side effect — they're left on disk and the
476- subsequent ``{mrcc,method=...}`` call picks them up automatically.
474+ UHF orbitals are semicanonical by construction (alpha and beta Fock
475+ matrices are separately diagonal), saved to the default record 2100.2
476+ which MRCC reads — MRCC then reports ``Type=UHF/CANONICAL`` and runs
477+ the requested approximate-CC method.
477478 """
478479 self .job_mrcc_ccsdt .cpu_cores = 48
479480 self .job_mrcc_ccsdt .set_input_file_memory ()
480481 self .job_mrcc_ccsdt .write_input_file ()
481482 with open (os .path .join (self .job_mrcc_ccsdt .local_path ,
482483 input_filenames [self .job_mrcc_ccsdt .job_adapter ]), 'r' ) as f :
483484 content_ccsdt = f .read ()
484- # spc1 has multiplicity=3 (open-shell triplet) — uccsd prefix expected.
485+ # spc1 has multiplicity=3 (open-shell triplet) — UHF reference expected.
485486 expected_ccsdt = """***,spc1
486487memory,Total=438,m;
487488
@@ -496,12 +497,11 @@ def test_write_input_file_mrcc_routing(self):
496497
497498int;
498499
499- {hf ;
500+ {uhf ;
500501 maxit,999;
501502 wf,spin=2,charge=0;
502503}
503504
504- {uccsd}
505505{mrcc,method=CCSDT}
506506
507507
@@ -513,13 +513,12 @@ def test_write_input_file_mrcc_routing(self):
513513 # Sanity: the bare directive Molpro rejects must NOT appear on its own line.
514514 self .assertNotIn ('\n ccsdt;\n ' , content_ccsdt )
515515 self .assertNotIn ('\n uccsdt;\n ' , content_ccsdt )
516- # The uccsd step must come between the HF block and the mrcc plugin call —
517- # not after, not before HF.
518- uccsd_idx = content_ccsdt .index ('{uccsd}' )
519- hf_close_idx = content_ccsdt .index ('}\n \n {uccsd}' )
520- mrcc_idx = content_ccsdt .index ('{mrcc,method=CCSDT}' )
521- self .assertLess (hf_close_idx , uccsd_idx )
522- self .assertLess (uccsd_idx , mrcc_idx )
516+ # An earlier (insufficient) fix used `{uccsd}` between HF and MRCC —
517+ # this contract has been replaced with UHF, so {uccsd} must NOT appear.
518+ self .assertNotIn ('{uccsd}' , content_ccsdt )
519+ # UHF must replace HF as the only SCF reference (no {hf;...} block).
520+ self .assertNotIn ('{hf;' , content_ccsdt )
521+ self .assertIn ('{uhf;' , content_ccsdt )
523522
524523 self .job_mrcc_ccsdtq .cpu_cores = 48
525524 self .job_mrcc_ccsdtq .set_input_file_memory ()
@@ -555,9 +554,11 @@ def test_write_input_file_mrcc_routing(self):
555554"""
556555 self .assertEqual (content_ccsdtq , expected_ccsdtq )
557556 self .assertNotIn ('\n ccsdt(q);\n ' , content_ccsdtq )
558- # spc1 here has multiplicity=1 (closed-shell) — no semicanonical-orbital
559- # prep step is needed and none should be emitted .
557+ # spc1 here has multiplicity=1 (closed-shell) — RHF gives canonical
558+ # orbitals MRCC accepts directly. No UHF/UCCSD pre-step needed .
560559 self .assertNotIn ('{uccsd}' , content_ccsdtq )
560+ self .assertNotIn ('{uhf;' , content_ccsdtq )
561+ self .assertIn ('{hf;' , content_ccsdtq )
561562
562563 def test_set_files (self ):
563564 """Test setting files"""
0 commit comments