Bases: pyparticles.measures.measure.Measure
Class derived from Measure usedfor computing the total elastic potential energy of the particle system
return the dimension of the measure: 1 for the potential energy
Return the string: “potential energy”
return a tuple containing the shape of the measures dataset
Compute and return the elestic potential energy on the current state of the pset
return the current value of the potential energy
Bases: pyparticles.measures.measure.Measure
Class derived from Measure usedfor computing the total gravitational potential energy of the particle system
return the dimension of the measure: 1 for the potential energy
Return the string: “potential energy”
return a tuple containing the shape of the measures dataset
Compute and return the elestic potential energy on the current state of the pset
return the current value of the potential energy
Bases: pyparticles.measures.measure.Measure
Mesure for computing the total potential energy of the particle system
return the dimension of the measure: 1 for the potential energy
Return the string: “potential energy”
return a tuple containing the shape of the measures dataset
Compute and return the elestic potential energy on the current state of the pset
return the current value of the potential energy
Bases: object
‘Meaure’ for computing the total mass of the particle system
return the dimension of the measure: 1 for the mass
Return the string: “mass”
return a tuple containing the shape of the measures dataset
Compute and return the totale mass of the system
Return the current measured total mass
Bases: object
Main abstract class for defining the measurement procedures of the system, for example the total kinetic energy.
return the dimension of the measure, for the dimensionless measure it must return 1 (like kinetic energy or mass)
set and get the current force model
return the reference to the dict of the used parameter A parameter should be the volume, some constant ....
return a string containig the name of the measure
return the reference to the dict of the used paramenter
set and get the current measured particle set
return a tuple containing the shape of the measures dataset
get ad set the string format for representing the value
compute and return the value of the measured quantity
Return the value of the current measure
return a string containig the value of the current neasure formmatted according to the format defined with the str_property format. By default if uses the simple floaf format
Bases: pyparticles.measures.measure.Measure
Abstract class used fopr measuring a subset of partiles or a set of singles particles.
set and get the measurement model: “part_by_part” or “subsystem”
get and set the subset of particles to be measured
Bases: pyparticles.measures.measure.MeasureParticles
‘Measure’ for computing the momentum particle by particle or of a subsystem Example:
P = MomentumParticles( pset , subset=np.array([1,4,5]) , model="part_by_part")
P.update_measure()
print( P.value )
> [[ 1.1 , 2.3 , 3.2 ],
> [ 1.7 , 5.2 , 6.9 ],
> [ 1.8 , 2.3 , 1.7 ]
> ]
Constructor:
:param pset The particles set :param force The model of the used force :param subset a numpy 1D array containing the indicies of the measured particles :param model a strung describing the model for the measure: “part_by_part” or “subsystem”
return the dimension of the measure: Dim: (2D or 3D) for the momentum
Return the string: “momentum”
return a tuple containing the shape of the measures dataset
Compute and return the total momentum of the specified particles
return the current value of the momentum
Bases: pyparticles.measures.measure.Measure
‘Measure’ for computing the total momentum of the particle system
return the dimension of the measure: Dim for the momentum
Return the string: “momentum”
return a tuple containing the shape of the measures dataset
Compute and return the total momentum of the system
return the current value of the total momentum
Bases: pyparticles.measures.measure.Measure
return the dimension of the measure: 1 for the energy
Return the string: “total energy”
return a tuple containing the shape of the measures dataset
Compute and return the total energy on the current state of pset
return the current value of the potential energy