Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- def combinationRuleEpsilon(sig1, sig2):
- return (sig1*sig2)**0.5 #Berthelot
- def combinationRuleSigma(eps1, eps2):
- return (eps1+eps2)*0.5 #Lorentz
- def averageClusterSize(cluster_array):
- sum_particles = 0
- for c in cluster_array:
- sum_particles = sum_particles + c[1].size()
- if len(cluster_array)>0:
- return sum_particles/len(cluster_array)
- else:
- return 0;
- def addParticles(particleTypes,system):
- for type in particleTypes:
- for i in range(int(type.n)):
- temp=np.random.random(3)
- system.part.add(type=type.type, dip=temp/np.linalg.norm(temp)*type.dipoleMoment, pos=np.random.random(3) * system.box_l)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement