def freeze(this, selection = -1, v = [0, 0, 0], simulation = -1): if(selection == -1): selection = this.selections - 1; #end if(selection == -1): print "There are no selections!"; exit(); #end lastSim = this.simulations[simulation]; markFilename = lastSim + "/init/mark_%d.dat"%selection; if(not os.path.exists(markFilename)): print "%d is not a selection of the state %s"%(selection, lastSim); exit(); #end frozenFilename = lastSim + "/init/frozen.dat"; mdm.freeze(markFilename, frozenFilename, v);
def freeze(this, r1, r2, v = [0, 0, 0], types = "all", simulation = -1): if(types == "all"): types = [0, 1, 2]; elif(types == "Si"): types = [0]; elif(types == "O"): types = [1]; elif(types == "H"): types = [2]; #end splitted = this.splitted[simulation]; length = this.stateNumbers[simulation]; lastSim = this.simulations[simulation]; if(splitted): mdf.combine(lastSim, length, states = "last"); #end filename = lastSim + "/%05d/combined.xyz"%length; markFilename = lastSim + "/init/mark.dat"; mdm.freeze(filename, markFilename, r1, r2, v, types);