Example #1
0
from __future__ import division;
import numpy as np;
import simpleHole as hole;
from MDmanager import MDmanager as mdm;
from combineFiles import combiner;
import os;
import shutil;
import sys;
import multiprocessing as mpi;
import datetime;
import MDdata as mdd; usc = mdd.usc(); 

#Length (in timesteps) of simulation
sim = 750;
step = 150;
#Timestep length (fs)
dt = 0.25;

therm = 150;
thermstep = 160;
stab = 150;
stabstep = 150

dateAndTime = datetime.datetime.now().strftime("%Y-%m-%d_%H:%M:%S");
runName = dateAndTime
if(len(sys.argv) > 1):
	runName = sys.argv[1];
#end
path = os.path.expanduser("~/clayff_h2o/" + runName);
#Removes path if exists, resetting data
if(os.path.exists(path)):
from __future__ import division;
import numpy as np;
import MDmanager as mdm; mdm = mdm.MDmanager();
import sys;
import os;
import MDdata; usc = MDdata.usc();
import shutil;

dt = 0.25;
dtsio2 = 1.25;

tauTherm = 50*dt;
tauNH    = 25*dt;

sim  = 100;
step = 12500;

simSample = 100;
stepSample = 7500;

simTherm = 100;
simStab  = 100;
stepTherm = 100;
stepStab  = 100;

# p = np.zeros(3);
# p[0] = sys.argv[1];
# p[1] = sys.argv[2];
# p[2] = sys.argv[3];

runName = sys.argv[1];
from __future__ import division
import numpy as np
import os
import shutil
from math import floor
import multiprocessing as mp
import MDdata as mdd

mdd = mdd.usc()


def makeDirs(last, path, step=1, reset=False):
    if reset and os.path.exists(path):
        shutil.rmtree(path)
        # end
    if not os.path.exists(path):
        os.makedirs(path)
        # end
    for i in range(0, last + step, step):
        dirname = path + ("/%05d" % i)
        if not os.path.exists(dirname):
            os.makedirs(dirname)
            # end
            # end


# end


def split(path, p, s, dest=None, source=None, remove=0):
    if dest == None:
from __future__ import division;
import numpy as np;
import os;
import shutil;
from math import floor;
import multiprocessing as mp;
import MDdata as mdd; mdd = mdd.usc();

def makeDirs(last, path, step = 1, reset = False):
	if(reset and os.path.exists(path)):
		shutil.rmtree(path);
	#end
	if(not os.path.exists(path)):
		os.makedirs(path);
	#end
	for i in range(0, last + step, step):
		dirname = path + ("/%05d"%i);
		if(not os.path.exists(dirname)):
			os.makedirs(dirname);
		#end
	#end
#end

def split(path, p, s, dest = None, source = None, remove = 0):
	if(dest == None):
		dest = path + "/00000";
	#end
	if(source == None):
		source = path + "/00000/combined.xyz";
	#end
	if(not os.path.exists(dest)):