p = [3, 2, 2]; else: print "Unsupported number(" + str(mpi.cpu_count()) + ") of cpu cores, needs 8 or 12"; exit(); #end c = 10; b = usc.h2oDensityToCellSize(1); print b; c = np.array([c, c, c]); s = b*c; mdm = mdm(); mdm.compile(); mdm.setDir(path); mdm.setProcessors(p); mdm.setVolume(s); mdm.setTemperature(300); mdm.makeWater(c); mdm.thermalize(therm, dt, 25*dt, 10, thermstep); mdm.simulate(stab, dt, stabstep); mdm.noseHoover(sim, dt, 25*dt, step); mdm.makeVmdData(); # mdm.visualize(); mdm.radialDistribution(1024, label = "amorph", states = range(0,stableStates)); mdm.angularDistribution(1024, label = "amorph", states = range(0,stableStates));
for i in range(0, len(dirs)): n = 0; for f in os.listdir(dirs[i]): if(f.endswith(".xyz") and f != "combined.xyz" and f != "sorted.xyz"): n += 1; #end #end if(n == nP): stableStates += 1; else: print str(i) + " is unstable"; break; #end #end mdm.setDir(runName + "/analyzed"); mdm.loadSimulation(runName, stableStates); print stableStates # t = 25*np.arange(stableStates + 1, 25); # mdm.numberOfSilanol(3259.46268694, t, states = range(0, stableStates + 1, 25)); # mdm.makeVmdData(); # L = 12*0.716; # A = L*L; # dt = 0.25*50; # step = 25;