def setup(self): super(TestMISTISNetwork, self).setup() ifacesA = self.ifacesA[:-1] ifacesB = self.ifacesB[:-1] ms_outer = paths.MSOuterTISInterface( interface_sets=[ifacesA, ifacesB], volumes=[self.ifacesA[-1], self.ifacesB[-1]]) self.mistis = MISTISNetwork([(self.stateA, ifacesA, self.stateB), (self.stateB, ifacesB, self.stateA), (self.stateA, self.ifacesA, self.stateC)], ms_outers=[ms_outer])
def setup(self): paths.InterfaceSet._reset() self.cv_inc = paths.FunctionCV(name="inc", f=lambda s: s.xyz[0][0]) self.cv_dec = paths.FunctionCV(name="dec", f=lambda s: 1.0 - s.xyz[0][0]) self.lambdas = [0.0, 0.1, 0.2, 0.3] self.interfaces_inc = paths.VolumeInterfaceSet(cv=self.cv_inc, minvals=float("-inf"), maxvals=self.lambdas) self.interfaces_dec = paths.VolumeInterfaceSet(cv=self.cv_dec, minvals=float("-inf"), maxvals=self.lambdas) self.stateA = paths.CVDefinedVolume(self.cv_inc, float("-inf"), 0.0).named("A") self.stateB = paths.CVDefinedVolume(self.cv_dec, float("-inf"), 0.0).named("B") self.network = paths.MISTISNetwork([ (self.stateA, self.interfaces_inc, self.stateB), (self.stateB, self.interfaces_dec, self.stateA) ]) self.volumes = [ self.interfaces_inc.new_interface(0.5), self.interfaces_dec.new_interface(0.4) ] self.ms_outer_explicit = paths.MSOuterTISInterface( interface_sets=[self.interfaces_inc, self.interfaces_dec], volumes=self.volumes, lambdas=[0.5, 0.4]) self.ms_outer = paths.MSOuterTISInterface.from_lambdas({ self.interfaces_inc: 0.5, self.interfaces_dec: 0.4 }) # TODO: temporary hack until networks working; remove after self.post_network = paths.MSOuterTISInterface.from_lambdas({ t.interfaces: { self.cv_inc: 0.5, self.cv_dec: 0.4 }[t.interfaces.cv] for t in self.network.sampling_transitions })
def setup(self): super(TestMSTISNetwork, self).setup() ifacesA = self.ifacesA[:-1] ifacesB = self.ifacesB[:-1] ifacesC = self.ifacesC[:-1] ms_outer_info = [ (iface, paths.CVDefinedVolume(self.xval, minv, maxv)) for (iface, minv, maxv) in [(ifacesA, float("-inf"), -0.3), (ifacesB, -0.2, 0.2), (ifacesC, 0.5, float("inf"))] ] ms_outer_ifaces, ms_outer_volumes = list(zip(*ms_outer_info)) ms_outer_obj = paths.MSOuterTISInterface(ms_outer_ifaces, ms_outer_volumes) self.mstis = MSTISNetwork([(self.stateA, ifacesA), (self.stateB, ifacesB), (self.stateC, ifacesC)], ms_outers=ms_outer_obj)