See examples in Match.mw
A1::list reference geometryA2::list geometry to be matched to A1Superimpose(A1,A2,/perm2,{massweighted,isotopes,weights, det,axis,cellonly,translateonly,unorderedtvs, raiseerror,output,printout},$)
superimpose two chemically identical molecules (or list of points) to minimize the mean square distance between them,
perm2::list(posint):=[$1..nops(A2)] actually A2[perm2] is used to determine the required linear transformation;massweighted::boolean self-explanatory;isotopes::list:=[0$nops(A1)] to be passed to AtomMass routine;weights::Vector:=Vector(nops(A1),1) self-explanatory;det::{-1,0,1}:=0 the sign of the determinant of the rotation matrix, if 0 the best matching transformation is returned;axis::{undefined,Vector(3)}:=undefined fixed rotation axis;cellonly::boolean transform cell only including retranslation of atoms;translateonly::boolean self-explanatory;unorderedtvs::boolean use SuperimposeM to align translation vectors,
otherwise are rotated in such a way that the first vectors are fully aligned and the second vectors are aligned "in plane";raiseerror::boolean raise error instead of warning.output::string:="a" is a string of characters:
a superimposed atoms A2a=R.(A2-r2)+r1;r rotation matrix R;1,2 center of mass of the first r1 and second r2 molecule;d,D RMSD and RMSD*sqrt(W);e,f largest deviation and vector of all deviations;m,v matrix M (see the code) and its eigenvalues;w,W weights and their sum.GuessPermutation(A1,A2,/maxdev,{astable,checkidentity},$)::P,Vd
guess if two molecules have common part and determine corresponding index permutation, where
maxdev::numeric:=999 for distances to be included in the output list;astable::boolean output tables instead of lists;checkidentity::boolean fast pre-check if molecules can be identical, raises error if not identical by chemical composition;P::list permutation such that A1=A2[P], if there is no match P=[];Vd::list distances.MatchMol(A1,A2,/method,MSDmax,{emax,dmax,refp,asis,det,scan, opt4CA1,opt4CA2,opt4CO1,opt4CO2,output,printout,digits,xyzfile},$)
match two molecules, where
method::{"","topo","geo","refp"}:="" ;MSDmax::realcons:=`if`(method="geo",10.^(2-Digits),999) maximum allowed mean square deviation in Superimpose;emax::numeric:=`if`(method="geo",1,999) maximum allowed individual deviation in the refined superimposition;dmax::numeric:=0.3 only atoms closer than dmax are used in refining superimposing;refp::list:=[] list of i1=i2 for at least three prematched atoms;asis::boolean do not rotate or translate molecules for determining permutation;det::{-1,0,1}:=1 passed to Superimpose;scan::{0,1,2,3,12,13,23,123}:=123 check also reflections in the corresponding coordinates (if molecule is asymmetric use 0, if planar use 12 etc);opt4CA1::list:=[],opt4CA2::list:=opt4CA1 passed to ConnectAtoms;opt4CO1::list:=[], opt4CO2::list:=opt4CO1, passed to CanonicOrientation;digits::posint:=3 for printout;xyzfile::string:=cat(tmpfld,"_tmp.xyz") to visualize the refernce and superimposed geometries.output::string:="b" is a string of characters:
1,2 canonically oriented A1,2;a superimposed A2;b true/false;d RMSD;e max individual deviation;p permutation P;r rotation matrix;t translation vector;v distances Vd.