Metrics and Derived Quantities
Tissue Forge provides numerous methods to compute a range of derived quantities. Some quantities are top-level metrics that depend on the entire simulation volume, and others are localized to individual or groups of objects.
Pressure and Virial Tensors
For a system of \(N\) particles in a volume \(V\), the surface tension can be computed from the diagonal components of the pressure tensor \(P_{\alpha,\alpha}(\alpha=x,y,z)\). The \(P_{xx}\) components are
where \(\rho\) is the particle density, \(k\) is the Boltzmann constant, \(T\) is the temperature, and \(\mathbf{r}_{ij}\) and \(\mathbf{f}_{ij}\) are the relative position of, and force between, the \(i\mathrm{th}\) and \(j\mathrm{th}\) particles, respectively. Here \(\mathbf{f}_{ij}\) is only due to inter-particle interactions and excludes external forces. The pressure tensor is a measure of how much internal force exists in the specified set of particles.
A term in the definition of the pressure tensor is known as the virial tensor, which is defined as
The virial tensor represents half of the the product of the stress due to the net force between pairs of particles and the distance between them. Since the volume of a group of particles is not well defined, Tissue Forge provides the flexibility of using different volume metrics for computing the virial tensor and corresponding pressure tensor.
The pressure tensor for the entire simulation domain, or for a specific region,
can be calculated using the method virial
on the
universe.
import tissue_forge as tf
...
virial_universe = tf.Universe.virial()
virial_region = tf.Universe.virial(origin=[5.0, 6.0, 7.0], radius=2.0)
The viritual tensor about a particle can also be computed with the particle method
virial
within a specific distance.
class MyParticleType(tf.ParticleTypeSpec):
pass
my_particle_type = MyParticleType.get()
my_particle = my_particle_type()
virial = my_particle.virial(radius=3.0)
Centroid
The centroid of a system of \(N\) particles \(\mathbf{C}\), where each \(i\mathrm{th}\) particle has position \(\mathbf{r}_i\), is defined as
The centroid of a cluster is avilable using the property
centroid
.
Radius of Gyration
The radius of gyration is a measure of the dimensions of a group
(Cluster
) of particles. The radius of gyration of a group of
\(N\) particles is defined as
where \(\mathbf{C}\) is the centroid of the particles.
The radius of gyration for a cluster is available using the property
radius_of_gyration
.
Center of Mass
The center of mass of a system of \(N\) particles \(\mathbf{R}\), where each \(i\mathrm{th}\) particle has mass \(m_i\) and position \(\mathbf{r}_i\), satisfies the condition
\(\mathbf{R}\) is then defined as
where \(M\) is the sum of the masses of all of the particles.
The center of mass of a cluster is available using the property
center_of_mass
.
Moment of Inertia
For a system of \(N\) particles, the moment of inertia tensor mathbf{I} is a symmetric tensor defined as
Its diagonal elements are defined as
and its off-diagonal elements are defined as
Here \(m_{k}\) is the mass of the \(k\mathrm{th}\) particle, and
\(x_{k}\), \(y_{k}\) and \(z_{k}\) are its relative coordinates
with respect to the centroid of the cluster along the first, second and
third dimensions, respectively.
The moment of inertia tensor of a cluster is available using the property
moment_of_inertia
.