Shape Potential term This term includes potential terms to constrain the shape tensor of a atom selection. The shape tensor is defined as ( y_i^2+z_i^2 -x_i*y_i -x_i*z_i ) ( -x_i*y_i x_i^2+z_i^2 -y_i*z_i ) ( -x_i*z_i -y_i*z_i x_i^2+y_i^2 ) where (x_i,y_i,z_i) is the position of atom i relative to the center of the atom selection. Thus, the shape tensor is analogous to the inertia tensor: only it contains no mass information. There are separate potential terms which target the eigen values of this tensor (which correspond to size), and the eigenvectors of the tensor, which contain orientational information. Constructor: ShapePot(name, sel, sim) with arguments: name - a name for this potential term sel - (optional) an .AtomSel. Defaults to all atoms sim - (optional) a .Simulation Object. Defaults to .currentSimulation. Methods: calcEnergy() - calcs energy calcEnergyAndDerivs(DerivList) - calcs energy and derivative info note that these routines also update all other potential-specific data. Read-Write accessors: sizeScale - scale factor for the size term orientScale - scale factor for the orientation term targetSel - atom selection for target. Used if targetType=='molecule' sizeTol - error in size term. Used if sizePotType=='square' orientTol - error (in degrees) in orient term. Used if orientPotType=='square' targetType - specifies the target tensor 'molecule' : target specified by targetSel 'average' : target is the ensemble average of the shape tensor. 'pairwise' : the pairwise difference of the shape tensor between each ensemble member is minimized. sizePotType - potential type for size term: 'harmonic' or 'square' orientPotType - potential type for orient term: 'harmonic' or 'square' degenerateTol - if the difference between eigenvalues drops below this number, eigenvalue/eigenvector pairs are sorted such that the eigenvector overlap with the target is maximized, instead of by eigenvalue. Read-only accessors simulation() - simulation used by this shape term. Is an EnsembleSimulation atomSel() - atom selection defining the shape tensor. qCenter(index) - center of the atomSelection for ensemble given by index. qCenterTarget()- center position of the target selection. rotation(index)- rotation angle (in degrees) of shape tensor to target. The optional argument specifies the ensemble member (defaults to the current ensemble). getContrib(index,i) - get EigenPair for ensemble member index, number i. getTarget(i) - get EigenPair target shape tensor. EigenPair objects contain two members: value, vector info() - return string synopsis of potential info. showValues() - return pretty-printed eigenvalue info. showVectors() - return pretty-printed eigenvector info. The potential term is defined as E = sizeScale * ( V(ds_x,sizeTol) + V(ds_y,sizeTol) + V(ds_z,sizeTol) ) + orientScale * V(dTheta,orienTol) where ds_i = eigenValue(i) - target_eigenValue(i) dTheta = overall rotation of shapeTensor, relative to target and V(x,tol) = x^2 if potType=='harmonic' (abs(x)-tol)^2 if potType=='square'