espressopp.analysis.PressureTensorMultiLayer
This class computes the pressure tensor of the system in n layers. Layers are perpendicular to Z direction and are equidistant(distance is Lz/n). 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.PressureTensorMultiLayer(system, n, dh)
>>> for i in xrange(n):
>>> print("pressure tensor in layer %d: %s" % ( i, pt.compute()))
or
>>> pt = espressopp.analysis.PressureTensorMultiLayer(system, n, dh)
>>> for k in xrange(100):
>>> integrator.run(100)
>>> pt.performMeasurement()
>>> for i in xrange(n):
>>> print("average pressure tensor in layer %d: %s" % ( i, pt.compute()))
Example of usage in integrator with ExtAnalyze:
>>> pt = espressopp.analysis.PressureTensorMultiLayer(system, n, dh)
>>> extension_pt = espressopp.integrator.ExtAnalyze(pt , interval=100)
>>> integrator.addExtension(extension_pt)
>>> integrator.run(10000)
>>> pt_ave = pt.getAverageValue()
>>> for i in xrange(n):
>>> print("average Pressure Tensor = ", pt_ave[i][:6])
>>> print(" std deviation = ", pt_ave[i][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 n layers, 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.PressureTensorMultiLayer(system, n, dh)
- Parameters:
system
n
dh