PDB().write(mols, "test0000.pdb") space = PeriodicBox( (0,0,0), (10,10,10) ) switchfunc = HarmonicSwitchingFunction( 4.5, 4.0 ) ljff = InterLJFF(space, switchfunc) ljff.add(mols) ffields = ForceFields() ffields.add(ljff) all_mols = MoleculeGroup("all", mols) system = System(all_mols, ffields) system.setSpace(space) mc = RigidBodyMC( UniformSampler(all_mols) ) mc.setMaximumTranslation( 0.1 * angstrom ) volmc = VolumeMove( MapAsMolecules(all_mols) ) volmc.setVolumeChangingFunction( UniformVolumeChange(50 * angstrom3) ) moves = WeightedMoves() moves.add(mc, 125) moves.add(volmc, 1) for i in range(1,1001): print("Running block %d" % i) timer.start()
PDB().write(mols, "test0000.pdb") space = PeriodicBox((0, 0, 0), (10, 10, 10)) switchfunc = HarmonicSwitchingFunction(4.5, 4.0) ljff = InterLJFF(space, switchfunc) ljff.add(mols) ffields = ForceFields() ffields.add(ljff) all_mols = MoleculeGroup("all", mols) system = System(all_mols, ffields) system.setSpace(space) mc = RigidBodyMC(UniformSampler(all_mols)) mc.setMaximumTranslation(0.1 * angstrom) volmc = VolumeMove(MapAsMolecules(all_mols)) volmc.setVolumeChangingFunction(UniformVolumeChange(50 * angstrom3)) moves = WeightedMoves() moves.add(mc, 125) moves.add(volmc, 1) for i in range(1, 1001): print("Running block %d" % i) timer.start()