OpenMPCD
|
Public Member Functions | |
def | __init__ (self, config) |
def | getStarCount (self) |
def | getArmCountPerStar (self) |
def | getArmParticlesPerArm (self) |
def | getTotalParticleCountPerArm (self) |
def | hasMagneticParticles (self) |
def | getParticleMass (self) |
def | getTotalParticleCountPerStar (self) |
def | getTotalParticleCount (self) |
def | getParticleType (self, index) |
def | getParticleStructureIndices (self, particleID) |
def | particlesAreBonded (self, pID1, pID2) |
def | setParticles (self, particles) |
def | getMagneticClusters (self, magneticClusterMaxDistance) |
def | getMagneticClusterCount (self, magneticClusterMaxDistance) |
def | getWCAPotentialParameterEpsilon (self, type1, type2) |
def | getWCAPotentialParameterSigma (self, type1, type2) |
def | getWCAPotentialParameterD (self, type1, type2) |
def | getWCAPotential (self, type1, type2) |
def | getFENEPotential (self, type1, type2) |
def | getMagneticPotential (self) |
def | getPotentialEnergy (self) |
Representation of a collection of star polymers, as described in `OpenMPCD::CUDA::MPCSolute::StarPolymers`.
Definition at line 8 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.__init__ | ( | self, | |
config | |||
) |
The constructor. @throw NotImplementedError Throws if more than one star is configured. @param[in] config An instance of `Configuration` that contains the star polymer configuration as its root element. A copy of this instance is stored, rather than a reference to the given instance.
Definition at line 22 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getArmCountPerStar | ( | self | ) |
Returns the number of arms configured per star.
Definition at line 63 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getArmParticlesPerArm | ( | self | ) |
Returns the number of arm particles configured per arm.
Definition at line 76 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getFENEPotential | ( | self, | |
type1, | |||
type2 | |||
) |
Returns the WCA potential for the interaction of particles of types `type1` and `type2`. @warning The returned value is a reference to an internally cached object. Do not modify! @throw TypeError Throws if either `type1` or `type2` are not of type `str`. @throw ValueError Throws if either `type1` or `type2` have illegal values. @param[in] type1 The type of one of the particles, which must be one of `"Core"`, `"Arm"`, or `"Magnetic"` (the latter being allowed only if `hasMagneticParticles()`). @param[in] type2 The type of the other particle; see `type1` for further information.
Definition at line 613 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getMagneticClusterCount | ( | self, | |
magneticClusterMaxDistance | |||
) |
Returns the number of magnetic clusters. See `getMagneticClusters` for further documentation. @throw TypeError Throws if `magneticClusterMaxDistance` is neither `int` nor `float`. @throw ValueError Throws if no magnetic particles have been configured. @throw ValueError Throws if `setParticles` has not been called previously. @throw ValueError Throws if `magneticClusterMaxDistance` is negative.
Definition at line 441 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getMagneticClusters | ( | self, | |
magneticClusterMaxDistance | |||
) |
Returns the magnetic clusters, i.e. the largest groups of magnetic particles that have the property that from any one member of a magnetic cluster to any other member of that same cluster, there is a sequence of cluster members between the two magnetic particles such that the distance between consecutive members is at most `magneticClusterMaxDistance`. @throw TypeError Throws if `magneticClusterMaxDistance` is neither `int` nor `float`. @throw ValueError Throws if no magnetic particles have been configured. @throw ValueError Throws if `setParticles` has not been called previously. @throw ValueError Throws if `magneticClusterMaxDistance` is negative. @param[in] magneticClusterMaxDistance The maximum distance between magnetic particles that defines a cluster. Must be a non-negative `int` or `float`. @return Returns a list of clusters, where each cluster is represented as a list containing the positions (as instances of `Vector3DReal`) of the cluster members.
Definition at line 401 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getMagneticPotential | ( | self | ) |
Returns the magnetic dipole-dipole interaction potential. @warning The returned value is a reference to an internally cached object. Do not modify! @throw RuntimeError Throws if `not hasMagneticParticles()`.
Definition at line 643 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getParticleMass | ( | self | ) |
Returns the mass of a particle.
Definition at line 119 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getParticleStructureIndices | ( | self, | |
particleID | |||
) |
Returns the type of particle for the given particle index. @warning The returned value is a reference to an internally cached object. Do not modify! @throw IndexError Throws if `particleID` is out of range. @throw TypeError Throws if `particleID` is not an integer. @param[in] particleID The particle index, as an integer in the range [0, `getTotalParticleCount()` - 1]. @return Returns a list of integers. The first integer corresponds to the number of the star the given particle belongs to (ranging from `0` to `getStarCount() - 1`). If the particle is a `Core` particle, the following indices will be `None`; otherwise, the next index corresponds to the arm the particle corresponds to (in the range `0` to `getArmCountPerStar() - 1`). The last index is `None` if the particle is a `Magnetic` particle, and otherwise (i.e. if it is an `Arm` particle) corresponds to the position in the arm, in the range form `0` (for particle closest to the `Core`) to `getArmParticlesPerArm() - 1`.
Definition at line 227 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getParticleType | ( | self, | |
index | |||
) |
Returns the type of particle for the given particle index. @throw IndexError Throws if `index` is out of range. @throw TypeError Throws if `index` is not an integer. @param[in] index The particle index, as an integer in the range [0, `getTotalParticleCount()` - 1]. @return Returns "Core" for a core particle, "Arm" for an arm particle, and "Magnetic" for a magnetic end particle.
Definition at line 168 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getPotentialEnergy | ( | self | ) |
Computes the potential energy of the current system. @throw ValueError Throws if `setParticles` has not been called previously.
Definition at line 674 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getStarCount | ( | self | ) |
Returns the number of stars configured.
Definition at line 51 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getTotalParticleCount | ( | self | ) |
Returns the total number of particles in all stars.
Definition at line 142 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getTotalParticleCountPerArm | ( | self | ) |
Returns the total number of particles per arm.
Definition at line 89 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getTotalParticleCountPerStar | ( | self | ) |
Returns the total number of particles per star.
Definition at line 132 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getWCAPotential | ( | self, | |
type1, | |||
type2 | |||
) |
Returns the WCA potential for the interaction of particles of types `type1` and `type2`. @warning The returned value is a reference to an internally cached object. Do not modify! @throw TypeError Throws if either `type1` or `type2` are not of type `str`. @throw ValueError Throws if either `type1` or `type2` have illegal values. @param[in] type1 The type of one of the particles, which must be one of `"Core"`, `"Arm"`, or `"Magnetic"` (the latter being allowed only if `hasMagneticParticles()`). @param[in] type2 The type of the other particle; see `type1` for further information.
Definition at line 575 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getWCAPotentialParameterD | ( | self, | |
type1, | |||
type2 | |||
) |
Returns the WCA potential parameter \f$ D \f$ for the interaction of particles of types `type1` and `type2`. @throw TypeError Throws if either `type1` or `type2` are not of type `str`. @throw ValueError Throws if either `type1` or `type2` have illegal values. @param[in] type1 The type of one of the particles, which must be one of `"Core"`, `"Arm"`, or `"Magnetic"` (the latter being allowed only if `hasMagneticParticles()`). @param[in] type2 The type of the other particle; see `type1` for further information.
Definition at line 537 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getWCAPotentialParameterEpsilon | ( | self, | |
type1, | |||
type2 | |||
) |
Returns the WCA potential parameter \f$ \epsilon \f$ for the interaction of particles of types `type1` and `type2`. @throw TypeError Throws if either `type1` or `type2` are not of type `str`. @throw ValueError Throws if either `type1` or `type2` have illegal values. @param[in] type1 The type of one of the particles, which must be one of `"Core"`, `"Arm"`, or `"Magnetic"` (the latter being allowed only if `hasMagneticParticles()`). @param[in] type2 The type of the other particle; see `type1` for further information.
Definition at line 464 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.getWCAPotentialParameterSigma | ( | self, | |
type1, | |||
type2 | |||
) |
Returns the WCA potential parameter \f$ \sigma \f$ for the interaction of particles of types `type1` and `type2`. @throw TypeError Throws if either `type1` or `type2` are not of type `str`. @throw ValueError Throws if either `type1` or `type2` have illegal values. @param[in] type1 The type of one of the particles, which must be one of `"Core"`, `"Arm"`, or `"Magnetic"` (the latter being allowed only if `hasMagneticParticles()`). @param[in] type2 The type of the other particle; see `type1` for further information.
Definition at line 502 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.hasMagneticParticles | ( | self | ) |
Returns whether arms end in a magnetic particle.
Definition at line 106 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.particlesAreBonded | ( | self, | |
pID1, | |||
pID2 | |||
) |
Returns whether the two particles given are bonded. If `pID1 == pID2`, `False` is returned. @throw IndexError Throws if `pID1` or `pID2` are out of range. @throw TypeError Throws if `pID1` or `pID2` are not an integer. @param[in] pID1 The first particle index, as an integer in the range [0, `getTotalParticleCount()` - 1]. @param[in] pID2 The second particle index, as an integer in the range [0, `getTotalParticleCount()` - 1].
Definition at line 281 of file StarPolymers.py.
def MPCDAnalysis.StarPolymers.StarPolymers.setParticles | ( | self, | |
particles | |||
) |
Sets the collection of particles to use for dynamic calculations. @throw TypeError Throws if `particles` is not an instance of `ParticleCollection`. @throw ValueError Throws if `particles` does not conatin the right number of particles. @param[in] particles An instance of `ParticleCollection` containing `getTotalParticleCount` particles. Only a reference to this object is saved!
Definition at line 363 of file StarPolymers.py.