File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,7 +97,8 @@ def handle_parameters(self):
9797 self .main_command += f"--chrg { self .calc .charge } "
9898
9999 if self .calc .multiplicity != 1 :
100- self .main_command += f"--uhf { self .calc .multiplicity } "
100+ # uhf is the number of unpaired electrons
101+ self .main_command += f"--uhf { self .calc .multiplicity - 1 } "
101102
102103 def handle_constraints_scan (self ):
103104 if len (self .calc .constraints ) == 0 :
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ def test_sp_multiplicity(self):
4343
4444 xtb = self .generate_calculation (** params )
4545
46- REF = "xtb Cl.xyz --uhf 2 "
46+ REF = "xtb Cl.xyz --uhf 1 "
4747
4848 self .assertTrue (self .is_equivalent (REF , xtb .command ))
4949 self .assertTrue (self .is_equivalent ("" , xtb .input_file ))
@@ -59,7 +59,7 @@ def test_sp_charge_multiplicity(self):
5959
6060 xtb = self .generate_calculation (** params )
6161
62- REF = "xtb Cl.xyz --chrg -1 --uhf 3 "
62+ REF = "xtb Cl.xyz --chrg -1 --uhf 2 "
6363
6464 self .assertTrue (self .is_equivalent (REF , xtb .command ))
6565 self .assertTrue (self .is_equivalent ("" , xtb .input_file ))
You can’t perform that action at this time.
0 commit comments