This class computes the pressure tensor of the system in layer h0. It can be used as standalone class in python as well as in combination with the integrator extension ExtAnalyze.

Example of standalone Usage:

>>> pt = espressopp.analysis.PressureTensorLayer(system, h0, dh)
>>> print "pressure tensor of current configuration = ", pt.compute()


>>> pt = espressopp.analysis.PressureTensorLayer(system)
>>> for k in xrange(100):
>>>     pt.performMeasurement()
>>> print "average pressure tensor = ", pt.getAverageValue()

Example of usage in integrator with ExtAnalyze:

>>> pt           = espressopp.analysis.PressureTensorLayer(system)
>>> extension_pt = espressopp.integrator.ExtAnalyze(pt , interval=100)
>>> integrator.addExtension(extension_pt)
>>> pt_ave = pt.getAverageValue()
>>> print "average Pressure Tensor = ", pt_ave[:6]
>>> print "          std deviation = ", pt_ave[6:]
>>> print "number of measurements  = ", pt.getNumberOfMeasurements()

The following methods are supported:

  • performMeasurement()
    computes the pressure tensor and updates average and standard deviation
  • reset()
    resets average and standard deviation to 0
  • compute()
    computes the instant pressure tensor in layer h0, return value: [xx, yy, zz, xy, xz, yz]
  • getAverageValue()
    returns the average pressure tensor and the standard deviation, return value: [xx, yy, zz, xy, xz, yz, +-xx, +-yy, +-zz, +-xy, +-xz, +-yz]
  • getNumberOfMeasurements()
    counts the number of measurements that have been computed (standalone or in integrator) does _not_ include measurements that have been done using “compute()”
espressopp.analysis.PressureTensorLayer(system, h0, dh)
  • system
  • h0
  • dh