diff --git a/calphy/input.py b/calphy/input.py index e0703c4..c355dcb 100644 --- a/calphy/input.py +++ b/calphy/input.py @@ -121,6 +121,8 @@ def read_yamlfile(file): #eqbr and switching time "te": 25000, "ts": 50000, + #enable separate switching time for rs + "ts_rs": 50000, "tguess": None, "dtemp": 200, "maxattempts": 5, @@ -171,6 +173,15 @@ def read_yamlfile(file): options["md"]["pair_style"] = check_and_convert_to_list(indata["md"]["pair_style"]) options["md"]["pair_coeff"] = fix_paths(check_and_convert_to_list(indata["md"]["pair_coeff"])) + #now modify ts; + if isinstance(options["md"]["ts"], list): + ts1 = options["md"]["ts"][0] + ts2 = options["md"]["ts"][1] + options["md"]["ts"] = ts1 + options["md"]["ts_rs"] = ts2 + else: + options["md"]["ts_rs"] = options["md"]["ts"] + if not len(options["element"]) == len(options["mass"]): raise ValueError("length of elements and mass should be same!") options["nelements"] = len(options["element"]) diff --git a/calphy/phase.py b/calphy/phase.py index e46645e..8156523 100644 --- a/calphy/phase.py +++ b/calphy/phase.py @@ -344,7 +344,7 @@ def reversible_scaling(self, iteration=1): lmp.command("dump d1 all custom %d traj.forward_%d.dat id type mass x y z vx vy vz"%(self.options["md"]["traj_interval"], iteration)) - lmp.command("run %d"%self.options["md"]["ts"]) + lmp.command("run %d"%self.options["md"]["ts_rs"]) #unfix lmp.command("unfix f3") @@ -401,7 +401,7 @@ def reversible_scaling(self, iteration=1): lmp.command("dump d1 all custom %d traj.backward_%d.dat id type mass x y z vx vy vz"%(self.options["md"]["traj_interval"], iteration)) - lmp.command("run %d"%self.options["md"]["ts"]) + lmp.command("run %d"%self.options["md"]["ts_rs"]) lmp.command("unfix f3") lmp.command("unfix f1")