potential term to refine against chemical shift tensor magnitudes. This term is normally constructed using the helper function .create_CSTMagPot. constructor: CSTMagPot(instanceName, angle1Vals, angle2Vals, surf1Vals, surf2Vals, surf3Vals, simulation=0) instanceName is a user-specified identifier angle1Vals and angle2Vals are sequences of angle values defining a grid on which three tensor magnitudes s11, s22 and s33 are specified. surf1Vals, surf2Vals and surf3Vals are these surface values in .CDSMatrix_double objects. simulation is an optional .Simulation specification [it defaults to the current Simulation.] methods addRestraints(restraintString) - add the specified restraints specified in the given string. See below for restraint assignment syntax. calcEnergy() - calc energy, returns the energy value. calcEnergyAndDerivs(derivs) - calc energy, derivs, returns the energy value. rms() - return the restraint rms violation numRestraints() - return the numbder of restraints defined for this term. violations() - return number of violations restraints() - return a list of restraints. See the description of the CSTMag_Restraint class below. info() - current info about the state of this instance showRestraints(violated) - return info on restraints. Argument violated is boolean specifying whether to return only violated restraints. showViolations() - return string containing pretty-printed info on all violated restraints. simulation() - return the associated simulation. The following parameters can be set [defaults in square brackets] verbose - if true, sporadically spit out info [False] scale - scale factor [1] cstOffset - offset added to all surfaces [0] cstScale - scale factor applied to all surfaces [1] cstWeights - weighting in the energy calculation of each surface contribution [ (1,1,1) ] threshold - threshold in violation calculation [0.5] showAllRestraints - boolean which changes the behavior of showViolations. If this parameter is set to True, the behavior of showViolations is modified such that all restraints are printed. Violated restraints are indicated by an asterisk in the first column. [False] the above quantities may be retrieved using the member function form quantity(), while they are set using the form setQuantity(value). The following raw members can be accessed: angle1Vals - values of angles on the grid angle2Vals returned as a list. surf1 - the three surfaces representations corresponding to surf2 s11, s22 and s33. surf3 These are .Spline2D objects. The energy function for each restraint is defined as scale * (w1 * (s11-s11_obs)^2 + w2 * (s22-s22_obs)^2 + w3 * (s33-s33_obs)^2 ) where w1-3 are weights specified by cstWeights. s11, s22 and s33 are calculated from the two associated dihedral phi1 and phi2 angles via s11 = cstScale * surf1(phi1,phi2) + cstOffset surf1 is interpolated from the input surface grid values. The restraint table format consists of pairs of specifications. NAME ASSIgn (selection1A) (selection1B) (selection1C) (selection1D) (selection2A) (selection2B) (selection2C) (selection2D) ! optional comment The name statement specifies the name for the following assignment. If it is omitted, a numerical name is generated. The two sets of four atom selections in the ASSIgn statement specify two dihedral angles. This statement can be split across muliple lines, but the comment, if specified, should be on the same line as s33_obs. CSTMag_Restraint class methods: name() - the restraint name comment() - the restraint comment (entered after the ! in the ASSIgn statement) energy() - the energy associated with this restraint. raw members: phi1 - .Dihedral objects representing the two phi2 dihedral angles vphi1 - values of these angles from the most recent energy calculation vphi2 calcd1 - calculated surface values calcd2 calcd3 obs1 - observed surface values as input via the ASSIgn statement obs2 in the restraint table. obs3