def setup(self): traj = Trajectory([-0.5, 0.7, 1.1]) op = CallIdentity() volA = CVRangeVolume(op, -100, 0.0) volB = CVRangeVolume(op, 1.0, 100) volX = CVRangeVolume(op, -100, 0.25) tis = paths.TISEnsemble(volA, volB, volX) tps = ef.A2BEnsemble(volA, volB) len3 = LengthEnsemble(3) len2 = LengthEnsemble(2) self.hop_to_tis = RandomAllowedChoiceMover( map(lambda ens : EnsembleHopMover(*ens), [[tis, tis], [tps, tis], [len3, tis], [len2, tis]] ) ) self.hop_to_tps = RandomAllowedChoiceMover( map(lambda ens : EnsembleHopMover(*ens), [[tis, tps], [tps, tps], [len3, tps], [len2, tps]] ) ) self.hop_to_len3 = RandomAllowedChoiceMover( map(lambda ens : EnsembleHopMover(*ens), [[tis, len3], [tps, len3], [len3, len3], [len2, len3]] ) ) self.hop_to_len2 = RandomAllowedChoiceMover( map(lambda ens : EnsembleHopMover(*ens), [[tis, len2], [tps, len2], [len3, len2], [len2, len2]] ) ) self.init_sample = Sample(trajectory=traj, ensemble=len3, replica=0) self.tis = tis self.tps = tps self.len3 = len3 self.len2 = len2 self.everything_accepted_movers = [ self.hop_to_tis, self.hop_to_len3, self.hop_to_tps ] self.first_rejected_movers = [ self.hop_to_len2, self.hop_to_len3, self.hop_to_tps ] self.last_rejected_movers = [ self.hop_to_tis, self.hop_to_tps, self.hop_to_len2 ]
def setup(self): self.l1 = LengthEnsemble(1) self.l2 = LengthEnsemble(2) self.l3 = LengthEnsemble(3) self.s1 = Sample(replica=1, ensemble=self.l2) self.s2 = Sample(replica=2, ensemble=self.l1) self.s3 = Sample(replica=3, ensemble=self.l1) self.s4 = Sample(replica=2, ensemble=self.l3) self.sset = SampleSet([self.s1, self.s2, self.s3, self.s4])
def setup(self): self.ensA = LengthEnsemble(1) self.ensB = LengthEnsemble(2) traj0A = Trajectory([0.5]) traj1A = Trajectory([1.0]) traj2B = Trajectory([0.5, 0.75]) traj2B_ = Trajectory([0.8, 0.9]) self.s0A = Sample(replica=0, trajectory=traj0A, ensemble=self.ensA) self.s1A = Sample(replica=1, trajectory=traj1A, ensemble=self.ensA) self.s2B = Sample(replica=2, trajectory=traj2B, ensemble=self.ensB) self.s2B_ = Sample(replica=2, trajectory=traj2B_, ensemble=self.ensB) self.testset = SampleSet([self.s0A, self.s1A, self.s2B])
def test_setitem_replica(self): ensC = LengthEnsemble(3) traj3C = Trajectory([-0.5, -0.25, 0.1]) s3C = Sample(replica=3, trajectory=traj3C, ensemble=ensC) self.testset[3] = s3C self.testset.consistency_check() assert_equal(len(self.testset), 4)
def setup(self): self.mytraj = make_1d_traj(coordinates=[-0.5, 0.1, 0.2, 0.3, 0.5], velocities=[1.0, 1.0, 1.0, 1.0, 1.0]) self.dyn = CalvinistDynamics( [-0.5, -0.4, -0.3, -0.2, -0.1, 0.1, 0.2, 0.3, 0.4, 0.5]) self.dyn.initialized = True self.ens = LengthEnsemble(5) self.gs = SampleSet( Sample(replica=0, trajectory=self.mytraj, ensemble=self.ens))
def setup(self): traj = Trajectory([-0.5, 0.7, 1.1]) op = CallIdentity() volA = CVRangeVolume(op, -100, 0.0) volB = CVRangeVolume(op, 1.0, 100) volX = CVRangeVolume(op, -100, 0.25) self.tis = paths.TISEnsemble(volA, volB, volX) self.tps = ef.A2BEnsemble(volA, volB) self.len3 = LengthEnsemble(3) self.init_samp = SampleSet([Sample(trajectory=traj, ensemble=self.len3, replica=0)]) self.hop_to_tis = EnsembleHopMover( ensemble=self.len3, target_ensemble=self.tis ) self.hop_to_tps = EnsembleHopMover( ensemble=self.len3, target_ensemble=self.tps ) self.mover = RandomChoiceMover([self.hop_to_tis, self.hop_to_tps])