See examples in MatchMO.mw
MatchMO(A1,A2,moS1,mo2,minO,output,/lsi,KKB,{sym,ev,S,maxdS,maxrot,det:=1,printout,printO,raiseerror})
match two sets of MOs where
moS1::Matrix(n1,N1),mo2::Matrix(N2,n2)
are orbitals to match,minO::numeric
discard matched pairs with smaller O12[o1,o2]
,output::string
sequence of character-codes, see below,lsi::[lsi1,lsi2::list(posint)]:=[[]$2]
subset of atoms for each molecule used in matching,KKB::{[K1,K2::list(posint),BS2],[BS1,BS2],[BS2]}:=[]
defines subset of basis set indexes |K1|=|K2|=N
used in matching,
here K1,2
are the subset of indexes and BS1,2
are the basis sets;
note that only BS[k][1]=i
mapping is used to derive K
from lsi
,
but entire BS2
is used for MO2 rotation,sym::list:=[sym1,sym2::{list,Vector}(string),/w]:=[]
MO-symmetries,
if w>0
it is the penalty for symmetry mismatch in matching MOs,ev::list:=[ev1,ev2::Vector,/de]
MO-energies,
if de>0
then ((ev1-ev2)/de)^2
is the penalty for energy mismatch in matching MOs,S::[S1,S2]:=[]
basis set overlaps, if provided then moS1
must be momaxdS::numeric:=1e-8
threshold for |S1-S2|
to use S12=sqrt(S1[K1,K1]).sqrt(S2[K2,K2])
instead of S1[K1,K1]
,maxrot::numeric:=0.1
threshold for |R-1|
to rotate MO2,det::{-1,0,1}:=1
passed to Superimpose
command,printout::{boolean,posint}:=false
number of smallest-overlap orbitals to print (default is 9),printO::nonnegint:=0
size of O12
submatrix to print,raiseerror
raise error if there are unmatched MO1.a
superimposed A2
,b
derived basis set overlap matrix S12::Matrix(N)
,d
RMSD deviation in geometry,e
permuted ev21::Vector(n1)
,m
permuted and sign-corrected mo21::Matrix(N2,n1)
,o
overlap matrix O21::Matrix(n1)
between MOs1 and rotated and matched MOs2,q
overlap matrix O12::Matrix(n1,n2)
between MOs1 and rotated MOs2,p
permutation P21::list(n1)
of MOs2, so that e.g. ev21=ev2[P21]
except for unmatched MOs1 for which P21[o]=0
,r
rotation matrix A2
to A1
,s
correction signs for MOs2 after permutation s21::Vector(n1)
,u
number of unmatched MOs1,v
list of [o1,o2,val[o1,o2],O12[o1,o2],ev2[o2]-ev1[o1],[ev1[o1],ev2[o2]],[sym1[o1],sym2[o2]]]
for matched orbitals sorted by o1
,y
permuted sym21::Vector(n1)
,1
subset K1
2
subset K2
IdentifyPairs
by val[o1,o2]=-O12[o1,o2]^2
plus symmetry and energy penalties as described above.lsi1,2
and K1,2
should be taken large enough to represent MOs of interest.