예제 #1
0
def rij(particleList, boxDim):
    pDistances = []
    for i, el in enumerate(particleList):
        for j, al in enumerate(particleList):
            if i < j:
                pDistances.append(Particle3D.scalarSeparation(el, al, boxDim))
    return pDistances
예제 #2
0
def MeanSD(particleList, initialPosPart, boxDim):
    y = 0.
    for i in range(len(particleList)):
        x = Particle3D.scalarSeparation(particleList[i], initialPosPart[i],
                                        boxDim)**2
        y += x
    MSD = (1. / len(particleList)) * y
    return MSD