OpenMPCD
StarPolymers.py
1 from .ParticleCollection import ParticleCollection
2 
3 class StarPolymers:
4  """
5  Representation of a collection of star polymers, as described in
6  `OpenMPCD::CUDA::MPCSolute::StarPolymers`.
7  """
8 
9  def __init__(self, config):
10  """
11  The constructor.
12 
13  @throw NotImplementedError
14  Throws if more than one star is configured.
15 
16  @param[in] config
17  An instance of `Configuration` that contains the star polymer
18  configuration as its root element. A copy of this instance is
19  stored, rather than a reference to the given instance.
20  """
21 
22  from .Configuration import Configuration
23  if not isinstance(config, Configuration):
24  raise TypeError()
25 
26  import copy
27  self._config = copy.deepcopy(config)
28 
29  self._particles = None
30 
31  self._caches = \
32  {
33  "getParticleType": {},
34  "getParticleStructureIndices": {},
35  "particlesAreBonded": {},
36  "getWCAPotential": {},
37  "getFENEPotential": {},
38  "getMagneticPotential": None,
39  }
40 
41  if self.getStarCount() != 1:
42  raise NotImplementedError("Unimplemented")
43 
44 
45  def getStarCount(self):
46  """
47  Returns the number of stars configured.
48  """
49 
50  if "getStarCount" not in self._caches:
51  self._caches["getStarCount"] = self._config["structure.starCount"]
52 
53  return self._caches["getStarCount"]
54 
55 
56  def getArmCountPerStar(self):
57  """
58  Returns the number of arms configured per star.
59  """
60 
61  if "getArmCountPerStar" not in self._caches:
62  self._caches["getArmCountPerStar"] = \
63  self._config["structure.armCountPerStar"]
64 
65  return self._caches["getArmCountPerStar"]
66 
67 
68  def getArmParticlesPerArm(self):
69  """
70  Returns the number of arm particles configured per arm.
71  """
72 
73  if "getArmParticlesPerArm" not in self._caches:
74  self._caches["getArmParticlesPerArm"] = \
75  self._config["structure.armParticlesPerArm"]
76 
77  return self._caches["getArmParticlesPerArm"]
78 
79 
81  """
82  Returns the total number of particles per arm.
83  """
84 
85  if "getTotalParticleCountPerArm" in self._caches:
86  return self._caches["getTotalParticleCountPerArm"]
87 
88  ret = self.getArmParticlesPerArm()
90  ret += 1
91 
92  self._caches["getTotalParticleCountPerArm"] = ret
93  return ret
94 
95 
96  def hasMagneticParticles(self):
97  """
98  Returns whether arms end in a magnetic particle.
99  """
100 
101  if "hasMagneticParticles" not in self._caches:
102  self._caches["hasMagneticParticles"] = \
103  self._config["structure.hasMagneticParticles"]
104 
105  return self._caches["hasMagneticParticles"]
106 
107 
108  def getParticleMass(self):
109  """
110  Returns the mass of a particle.
111  """
112 
113  if "getParticleMass" not in self._caches:
114  self._caches["getParticleMass"] = \
115  self._config["structure.particleMass"]
116 
117  return self._caches["getParticleMass"]
118 
119 
121  """
122  Returns the total number of particles per star.
123  """
124 
125  armsPerStar = self.getArmCountPerStar()
126  return 1 + armsPerStar * self.getTotalParticleCountPerArm()
127 
128 
129  def getTotalParticleCount(self):
130  """
131  Returns the total number of particles in all stars.
132  """
133 
134  if "getTotalParticleCount" in self._caches:
135  return self._caches["getTotalParticleCount"]
136 
137  ret = self.getStarCount() * self.getTotalParticleCountPerStar()
138  self._caches["getTotalParticleCount"] = ret
139  return ret
140 
141 
142  def getParticleType(self, index):
143  """
144  Returns the type of particle for the given particle index.
145 
146  @throw IndexError
147  Throws if `index` is out of range.
148  @throw TypeError
149  Throws if `index` is not an integer.
150 
151  @param[in] index
152  The particle index, as an integer in the range
153  [0, `getTotalParticleCount()` - 1].
154 
155  @return Returns "Core" for a core particle, "Arm" for an arm particle,
156  and "Magnetic" for a magnetic end particle.
157  """
158 
159  if not isinstance(index, int):
160  raise TypeError()
161 
162 
163  if index in self._caches["getParticleType"]:
164  return self._caches["getParticleType"][index]
165 
166 
167  if index < 0 or index >= self.getTotalParticleCount():
168  raise IndexError()
169 
170  originalIndex = index
171  index = index % self.getTotalParticleCountPerStar()
172 
173  if index == 0:
174  self._caches["getParticleType"][originalIndex] = "Core"
175  return "Core"
176 
177  index -= 1
178 
179  index = index % self.getTotalParticleCountPerArm()
180 
181  if index == self.getArmParticlesPerArm():
182  self._caches["getParticleType"][originalIndex] = "Magnetic"
183  return "Magnetic"
184 
185  self._caches["getParticleType"][originalIndex] = "Arm"
186  return "Arm"
187 
188 
189  def getParticleStructureIndices(self, particleID):
190  """
191  Returns the type of particle for the given particle index.
192 
193  @warning The returned value is a reference to an internally cached
194  object. Do not modify!
195 
196  @throw IndexError
197  Throws if `particleID` is out of range.
198  @throw TypeError
199  Throws if `particleID` is not an integer.
200 
201  @param[in] particleID
202  The particle index, as an integer in the range
203  [0, `getTotalParticleCount()` - 1].
204 
205  @return Returns a list of integers. The first integer corresponds to the
206  number of the star the given particle belongs to (ranging from
207  `0` to `getStarCount() - 1`). If the particle is a `Core`
208  particle, the following indices will be `None`; otherwise, the
209  next index corresponds to the arm the particle corresponds to
210  (in the range `0` to `getArmCountPerStar() - 1`). The last index
211  is `None` if the particle is a `Magnetic` particle, and
212  otherwise (i.e. if it is an `Arm` particle) corresponds to the
213  position in the arm, in the range form `0` (for particle closest
214  to the `Core`) to `getArmParticlesPerArm() - 1`.
215  """
216 
217  if not isinstance(particleID, int):
218  raise TypeError()
219 
220  if particleID in self._caches["getParticleStructureIndices"]:
221  return self._caches["getParticleStructureIndices"][particleID]
222 
223  if particleID < 0 or particleID >= self.getTotalParticleCount():
224  raise IndexError()
225 
226  originalParticleID = particleID
227 
228  star = particleID // self.getTotalParticleCountPerStar()
229  particleID = particleID % self.getTotalParticleCountPerStar()
230 
231  if particleID == 0:
232  ret = [star, None, None]
233  self._caches["getParticleStructureIndices"][originalParticleID] = \
234  ret
235  return ret
236 
237  particleID -= 1
238 
239  arm = particleID // self.getTotalParticleCountPerArm()
240  particleID = particleID % self.getTotalParticleCountPerArm()
241 
242  if self.hasMagneticParticles():
243  if particleID == self.getArmParticlesPerArm():
244  return [star, arm, None]
245 
246  ret = [star, arm, particleID]
247  self._caches["getParticleStructureIndices"][originalParticleID] = ret
248  return ret
249 
250 
251  def particlesAreBonded(self, pID1, pID2):
252  """
253  Returns whether the two particles given are bonded.
254 
255  If `pID1 == pID2`, `False` is returned.
256 
257  @throw IndexError
258  Throws if `pID1` or `pID2` are out of range.
259  @throw TypeError
260  Throws if `pID1` or `pID2` are not an integer.
261 
262  @param[in] pID1
263  The first particle index, as an integer in the range
264  [0, `getTotalParticleCount()` - 1].
265  @param[in] pID2
266  The second particle index, as an integer in the range
267  [0, `getTotalParticleCount()` - 1].
268  """
269 
270  if not isinstance(pID1, int):
271  raise TypeError()
272 
273  if not isinstance(pID2, int):
274  raise TypeError()
275 
276 
277  if (pID1, pID2) in self._caches["particlesAreBonded"]:
278  return self._caches["particlesAreBonded"][(pID1, pID2)]
279 
280 
281  if pID1 < 0 or pID1 >= self.getTotalParticleCount():
282  raise IndexError()
283 
284  if pID2 < 0 or pID2 >= self.getTotalParticleCount():
285  raise IndexError()
286 
287 
288  if pID1 == pID2:
289  self._caches["particlesAreBonded"][(pID1, pID2)] = False
290  return False
291 
292  indices1 = self.getParticleStructureIndices(pID1)
293  indices2 = self.getParticleStructureIndices(pID2)
294 
295  if indices1[0] != indices2[0]:
296  self._caches["particlesAreBonded"][(pID1, pID2)] = False
297  return False
298 
299  if indices1[1] is None or indices2[1] is None:
300  if indices1[1] is None:
301  nonCore = indices2
302  else:
303  nonCore = indices1
304 
305  if self.getArmParticlesPerArm() == 0 \
306  and self.hasMagneticParticles():
307  self._caches["particlesAreBonded"][(pID1, pID2)] = True
308  return True
309 
310  return nonCore[2] == 0
311 
312  if indices1[1] != indices2[1]:
313  self._caches["particlesAreBonded"][(pID1, pID2)] = False
314  return False
315 
316  if indices1[2] is None or indices2[2] is None:
317  if indices1[2] is None:
318  if indices2[2] is None:
319  self._caches["particlesAreBonded"][(pID1, pID2)] = False
320  return False
321  nonMagnetic = indices2
322  else:
323  nonMagnetic = indices1
324 
325  ret = nonMagnetic[2] == self.getArmParticlesPerArm() - 1
326  self._caches["particlesAreBonded"][(pID1, pID2)] = ret
327  return ret
328 
329 
330  ret = abs(indices1[2] - indices2[2]) == 1
331  self._caches["particlesAreBonded"][(pID1, pID2)] = ret
332  return ret
333 
334 
335  def setParticles(self, particles):
336  """
337  Sets the collection of particles to use for dynamic calculations.
338 
339  @throw TypeError
340  Throws if `particles` is not an instance of `ParticleCollection`.
341  @throw ValueError
342  Throws if `particles` does not conatin the right number of
343  particles.
344 
345  @param[in] particles
346  An instance of `ParticleCollection` containing
347  `getTotalParticleCount` particles.
348  Only a reference to this object is saved!
349  """
350 
351  if not isinstance(particles, ParticleCollection):
352  raise TypeError()
353 
354  if particles.getParticleCount() != self.getTotalParticleCount():
355  raise ValueError()
356 
357  self._particles = particles
358 
359 
360  def getMagneticClusters(self, magneticClusterMaxDistance):
361  """
362  Returns the magnetic clusters, i.e. the largest groups of magnetic
363  particles that have the property that from any one member of a magnetic
364  cluster to any other member of that same cluster, there is a sequence of
365  cluster members between the two magnetic particles such that the
366  distance between consecutive members is at most
367  `magneticClusterMaxDistance`.
368 
369  @throw TypeError
370  Throws if `magneticClusterMaxDistance` is neither `int` nor
371  `float`.
372  @throw ValueError
373  Throws if no magnetic particles have been configured.
374  @throw ValueError
375  Throws if `setParticles` has not been called previously.
376  @throw ValueError
377  Throws if `magneticClusterMaxDistance` is negative.
378 
379  @param[in] magneticClusterMaxDistance
380  The maximum distance between magnetic particles that defines
381  a cluster. Must be a non-negative `int` or `float`.
382 
383  @return Returns a list of clusters, where each cluster is represented as
384  a list containing the positions (as instances of `Vector3DReal`)
385  of the cluster members.
386  """
387 
388  if not isinstance(magneticClusterMaxDistance, (int, float)):
389  raise TypeError()
390 
391  if magneticClusterMaxDistance < 0:
392  raise ValueError()
393 
394  if not self.hasMagneticParticles():
395  raise ValueError()
396 
397  if self._particles is None:
398  raise ValueError()
399 
400  magnetPositions = []
401  for index in range(0, self._particles.getParticleCount()):
402  if self.getParticleType(index) == "Magnetic":
403  magnetPositions.append(self._particles.getPosition(index))
404 
405  clusters = [[pos] for pos in magnetPositions]
406 
407  return self._mergeClusters(clusters, magneticClusterMaxDistance)
408 
409 
410  def getMagneticClusterCount(self, magneticClusterMaxDistance):
411  """
412  Returns the number of magnetic clusters.
413 
414  See `getMagneticClusters` for further documentation.
415 
416  @throw TypeError
417  Throws if `magneticClusterMaxDistance` is neither `int` nor
418  `float`.
419  @throw ValueError
420  Throws if no magnetic particles have been configured.
421  @throw ValueError
422  Throws if `setParticles` has not been called previously.
423  @throw ValueError
424  Throws if `magneticClusterMaxDistance` is negative.
425  """
426 
427  return len(self.getMagneticClusters(magneticClusterMaxDistance))
428 
429 
430  def getWCAPotentialParameterEpsilon(self, type1, type2):
431  r"""
432  Returns the WCA potential parameter \f$ \epsilon \f$ for the interaction
433  of particles of types `type1` and `type2`.
434 
435  @throw TypeError
436  Throws if either `type1` or `type2` are not of type `str`.
437  @throw ValueError
438  Throws if either `type1` or `type2` have illegal values.
439 
440  @param[in] type1
441  The type of one of the particles, which must be one of
442  `"Core"`, `"Arm"`, or `"Magnetic"` (the latter being allowed
443  only if `hasMagneticParticles()`).
444  @param[in] type2
445  The type of the other particle; see `type1` for further
446  information.
447  """
448 
449  for t in [type1, type2]:
450  if not isinstance(t, str):
451  raise TypeError
452  allowedValues = ["Core", "Arm"]
453  if self.hasMagneticParticles():
454  allowedValues.append("Magnetic")
455  if t not in allowedValues:
456  raise ValueError()
457 
458  epsilon1 = \
459  self._config["interactionParameters.epsilon_" + type1.lower()]
460  epsilon2 = \
461  self._config["interactionParameters.epsilon_" + type2.lower()]
462 
463  import math
464  return math.sqrt(epsilon1 * epsilon2)
465 
466 
467  def getWCAPotentialParameterSigma(self, type1, type2):
468  r"""
469  Returns the WCA potential parameter \f$ \sigma \f$ for the interaction
470  of particles of types `type1` and `type2`.
471 
472  @throw TypeError
473  Throws if either `type1` or `type2` are not of type `str`.
474  @throw ValueError
475  Throws if either `type1` or `type2` have illegal values.
476 
477  @param[in] type1
478  The type of one of the particles, which must be one of
479  `"Core"`, `"Arm"`, or `"Magnetic"` (the latter being allowed
480  only if `hasMagneticParticles()`).
481  @param[in] type2
482  The type of the other particle; see `type1` for further
483  information.
484  """
485 
486  for t in [type1, type2]:
487  if not isinstance(t, str):
488  raise TypeError
489  allowedValues = ["Core", "Arm"]
490  if self.hasMagneticParticles():
491  allowedValues.append("Magnetic")
492  if t not in allowedValues:
493  raise ValueError()
494 
495  sigma1 = self._config["interactionParameters.sigma_" + type1.lower()]
496  sigma2 = self._config["interactionParameters.sigma_" + type2.lower()]
497 
498  return (sigma1 + sigma2) / 2.0
499 
500 
501  def getWCAPotentialParameterD(self, type1, type2):
502  r"""
503  Returns the WCA potential parameter \f$ D \f$ for the interaction
504  of particles of types `type1` and `type2`.
505 
506  @throw TypeError
507  Throws if either `type1` or `type2` are not of type `str`.
508  @throw ValueError
509  Throws if either `type1` or `type2` have illegal values.
510 
511  @param[in] type1
512  The type of one of the particles, which must be one of
513  `"Core"`, `"Arm"`, or `"Magnetic"` (the latter being allowed
514  only if `hasMagneticParticles()`).
515  @param[in] type2
516  The type of the other particle; see `type1` for further
517  information.
518  """
519 
520  for t in [type1, type2]:
521  if not isinstance(t, str):
522  raise TypeError
523  allowedValues = ["Core", "Arm"]
524  if self.hasMagneticParticles():
525  allowedValues.append("Magnetic")
526  if t not in allowedValues:
527  raise ValueError()
528 
529  d1 = self._config["interactionParameters.D_" + type1.lower()]
530  d2 = self._config["interactionParameters.D_" + type2.lower()]
531 
532  return (d1 + d2) / 2.0
533 
534 
535  def getWCAPotential(self, type1, type2):
536  """
537  Returns the WCA potential for the interaction of particles of types
538  `type1` and `type2`.
539 
540  @warning The returned value is a reference to an internally cached
541  object. Do not modify!
542 
543  @throw TypeError
544  Throws if either `type1` or `type2` are not of type `str`.
545  @throw ValueError
546  Throws if either `type1` or `type2` have illegal values.
547 
548  @param[in] type1
549  The type of one of the particles, which must be one of
550  `"Core"`, `"Arm"`, or `"Magnetic"` (the latter being allowed
551  only if `hasMagneticParticles()`).
552  @param[in] type2
553  The type of the other particle; see `type1` for further
554  information.
555  """
556 
557  if (type1, type2) in self._caches["getWCAPotential"]:
558  return self._caches["getWCAPotential"][(type1, type2)]
559 
560  epsilon = self.getWCAPotentialParameterEpsilon(type1, type2)
561  sigma = self.getWCAPotentialParameterSigma(type1, type2)
562  d = self.getWCAPotentialParameterD(type1, type2)
563 
564  from .PairPotentials.WeeksChandlerAndersen_DistanceOffset\
565  import WeeksChandlerAndersen_DistanceOffset as WCA
566 
567  ret = WCA(epsilon, sigma, d)
568  self._caches["getWCAPotential"][(type1, type2)] = ret
569  return ret
570 
571 
572  def getFENEPotential(self, type1, type2):
573  """
574  Returns the WCA potential for the interaction of particles of types
575  `type1` and `type2`.
576 
577  @warning The returned value is a reference to an internally cached
578  object. Do not modify!
579 
580  @throw TypeError
581  Throws if either `type1` or `type2` are not of type `str`.
582  @throw ValueError
583  Throws if either `type1` or `type2` have illegal values.
584 
585  @param[in] type1
586  The type of one of the particles, which must be one of
587  `"Core"`, `"Arm"`, or `"Magnetic"` (the latter being allowed
588  only if `hasMagneticParticles()`).
589  @param[in] type2
590  The type of the other particle; see `type1` for further
591  information.
592  """
593 
594  if (type1, type2) in self._caches["getFENEPotential"]:
595  return self._caches["getFENEPotential"][(type1, type2)]
596 
597  epsilon = self.getWCAPotentialParameterEpsilon(type1, type2)
598  sigma = self.getWCAPotentialParameterSigma(type1, type2)
599  d = self.getWCAPotentialParameterD(type1, type2)
600 
601  from .PairPotentials.FENE import FENE
602 
603  K = 30 * epsilon / (sigma * sigma)
604  l_0 = d
605  R = 1.5 * sigma
606 
607  ret = FENE(K, l_0, R)
608  self._caches["getFENEPotential"][(type1, type2)] = ret
609  return ret
610 
611 
612  def getMagneticPotential(self):
613  """
614  Returns the magnetic dipole-dipole interaction potential.
615 
616  @warning The returned value is a reference to an internally cached
617  object. Do not modify!
618 
619  @throw RuntimeError
620  Throws if `not hasMagneticParticles()`.
621  """
622 
623  if not self.hasMagneticParticles():
624  raise RuntimeError()
625 
626  if self._caches["getMagneticPotential"] is not None:
627  return self._caches["getMagneticPotential"]
628 
629  from .PairPotentials.MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles \
630  import MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles \
631  as Potential
632  from .Vector3DReal import Vector3DReal
633 
634  prefactor = self._config["interactionParameters.magneticPrefactor"]
635  orientationX = self._config["interactionParameters.dipoleOrientation.[0]"]
636  orientationY = self._config["interactionParameters.dipoleOrientation.[1]"]
637  orientationZ = self._config["interactionParameters.dipoleOrientation.[2]"]
638  orientation = Vector3DReal(orientationX, orientationY, orientationZ)
639 
640  ret = Potential(prefactor, orientation)
641  self._caches["getMagneticPotential"] = ret
642  return ret
643 
644 
645  def getPotentialEnergy(self):
646  """
647  Computes the potential energy of the current system.
648 
649  @throw ValueError
650  Throws if `setParticles` has not been called previously.
651  """
652 
653  if self._particles is None:
654  raise ValueError()
655 
656  if self.getStarCount() != 1:
657  raise NotImplementedError()
658 
659 
660  ret = 0.0
661  magnetic = self.getMagneticPotential()
662 
663  for pID1 in range(0, self.getTotalParticleCount()):
664  type1 = self.getParticleType(pID1)
665  pos1 = self._particles.getPosition(pID1)
666  for pID2 in range(pID1 + 1, self.getTotalParticleCount()):
667  type2 = self.getParticleType(pID2)
668  pos2 = self._particles.getPosition(pID2)
669 
670  r = pos1 - pos2
671 
672  wca = self.getWCAPotential(type1, type2)
673  ret += wca.getPotential(r)
674 
675  if self.particlesAreBonded(pID1, pID2):
676  fene = self.getFENEPotential(type1, type2)
677  ret += fene.getPotential(r)
678 
679  if type1 == "Magnetic" and type2 == "Magnetic":
680  ret += magnetic.getPotential(r)
681 
682  return ret
683 
684 
685  def _mergeClusters(self, clusters, magneticClusterMaxDistance):
686  for cluster in clusters:
687  for otherCluster in clusters:
688  if otherCluster == cluster:
689  continue
690 
691  for position in cluster:
692  for otherPosition in otherCluster:
693  delta = position - otherPosition
694  distance = delta.getLength()
695  if distance <= magneticClusterMaxDistance:
696  newClusters = []
697  for newCluster in clusters:
698  if newCluster == cluster:
699  continue
700  if newCluster == otherCluster:
701  continue
702  newClusters.append(newCluster)
703  newClusters.append(cluster + otherCluster)
704 
705  return \
706  self._mergeClusters(
707  newClusters, magneticClusterMaxDistance)
708 
709  return clusters
MPCDAnalysis.StarPolymers.StarPolymers.getArmParticlesPerArm
def getArmParticlesPerArm(self)
Definition: StarPolymers.py:76
MPCDAnalysis.StarPolymers.StarPolymers.getTotalParticleCount
def getTotalParticleCount(self)
Definition: StarPolymers.py:142
MPCDAnalysis.StarPolymers.StarPolymers.getParticleMass
def getParticleMass(self)
Definition: StarPolymers.py:119
MPCDAnalysis.StarPolymers.StarPolymers.getStarCount
def getStarCount(self)
Definition: StarPolymers.py:51
MPCDAnalysis.StarPolymers.StarPolymers.getMagneticClusters
def getMagneticClusters(self, magneticClusterMaxDistance)
Definition: StarPolymers.py:401
MPCDAnalysis.StarPolymers.StarPolymers.hasMagneticParticles
def hasMagneticParticles(self)
Definition: StarPolymers.py:106
MPCDAnalysis.StarPolymers.StarPolymers.getWCAPotentialParameterD
def getWCAPotentialParameterD(self, type1, type2)
Definition: StarPolymers.py:537
MPCDAnalysis.StarPolymers.StarPolymers.particlesAreBonded
def particlesAreBonded(self, pID1, pID2)
Definition: StarPolymers.py:281
MPCDAnalysis.StarPolymers.StarPolymers.getTotalParticleCountPerStar
def getTotalParticleCountPerStar(self)
Definition: StarPolymers.py:132
MPCDAnalysis.StarPolymers.StarPolymers.getMagneticClusterCount
def getMagneticClusterCount(self, magneticClusterMaxDistance)
Definition: StarPolymers.py:441
MPCDAnalysis.StarPolymers.StarPolymers.getArmCountPerStar
def getArmCountPerStar(self)
Definition: StarPolymers.py:63
MPCDAnalysis.StarPolymers.StarPolymers.setParticles
def setParticles(self, particles)
Definition: StarPolymers.py:363
OpenMPCD::CUDA::MPCSolute::ImplementationDetails::StarPolymers::getParticleCount
OPENMPCD_CUDA_HOST_AND_DEVICE std::size_t getParticleCount(const std::size_t starCount, const std::size_t armCountPerStar, const std::size_t particleCountPerArm, const bool hasMagneticParticles)
Returns the total number of particles in a StarPolymers instance.
Definition: StarPolymers_Implementation.hpp:42
MPCDAnalysis.StarPolymers.StarPolymers.getParticleStructureIndices
def getParticleStructureIndices(self, particleID)
Definition: StarPolymers.py:227
MPCDAnalysis.StarPolymers.StarPolymers.getParticleType
def getParticleType(self, index)
Definition: StarPolymers.py:168
MPCDAnalysis.StarPolymers.StarPolymers.getWCAPotentialParameterEpsilon
def getWCAPotentialParameterEpsilon(self, type1, type2)
Definition: StarPolymers.py:464
MPCDAnalysis.StarPolymers.StarPolymers._caches
_caches
Definition: StarPolymers.py:33
MPCDAnalysis.StarPolymers.StarPolymers._particles
_particles
Definition: StarPolymers.py:31
MPCDAnalysis.StarPolymers.StarPolymers.getPotentialEnergy
def getPotentialEnergy(self)
Definition: StarPolymers.py:674
MPCDAnalysis.StarPolymers.StarPolymers.getTotalParticleCountPerArm
def getTotalParticleCountPerArm(self)
Definition: StarPolymers.py:89
MPCDAnalysis.StarPolymers.StarPolymers.__init__
def __init__(self, config)
Definition: StarPolymers.py:22
MPCDAnalysis.StarPolymers.StarPolymers._config
_config
Definition: StarPolymers.py:29
MPCDAnalysis.StarPolymers.StarPolymers.getWCAPotentialParameterSigma
def getWCAPotentialParameterSigma(self, type1, type2)
Definition: StarPolymers.py:502
MPCDAnalysis.StarPolymers.StarPolymers.getMagneticPotential
def getMagneticPotential(self)
Definition: StarPolymers.py:643
MPCDAnalysis.StarPolymers.StarPolymers.getFENEPotential
def getFENEPotential(self, type1, type2)
Definition: StarPolymers.py:613
MPCDAnalysis.StarPolymers.StarPolymers._mergeClusters
def _mergeClusters(self, clusters, magneticClusterMaxDistance)
Definition: StarPolymers.py:708
MPCDAnalysis.StarPolymers.StarPolymers.getWCAPotential
def getWCAPotential(self, type1, type2)
Definition: StarPolymers.py:575