Exemple #1
0
                           .setProperty("b-factor",beta_ljnrg).molecule().commit()

            total_mol = total_mol.atom(atoms[j].index()).edit() \
                                 .setProperty("b-factor",beta_total).molecule().commit()

        coul_group.update(coul_mol)
        lj_group.update(lj_mol)
        total_group.update(total_mol)

    print("Total energies: %f  %f  %f" % (cnrg, ljnrg, cnrg + ljnrg))

    PDB().write(coul_group, "test_coul_%0004d.pdb" % id)
    PDB().write(lj_group, "test_lj_%0004d.pdb" % id)
    PDB().write(total_group, "test_total_%0004d.pdb" % id)


print("Running a simulation...")

for i in range(1, 11):
    system = moves.move(system, 2000, True)

    nrgmon = system.monitor(MonitorName("solute_shell"))

    PDB().write(system.molecules(), "test_sim_%0004d.pdb" % i)

    system.clearStatistics()

    print("Step %d of 10: Energy = %s" % (i, system.energy()))

    view(nrgmon, i)
Exemple #2
0
            lj_mol = lj_mol.atom(atoms[j].index()).edit() \
                           .setProperty("b-factor",beta_ljnrg).molecule().commit()

            total_mol = total_mol.atom(atoms[j].index()).edit() \
                                 .setProperty("b-factor",beta_total).molecule().commit()

        coul_group.update(coul_mol)
        lj_group.update(lj_mol)
        total_group.update(total_mol)

    print("Total energies: %f  %f  %f" % (cnrg, ljnrg, cnrg+ljnrg))

    PDB().write(coul_group, "test_coul_%0004d.pdb" % id)
    PDB().write(lj_group, "test_lj_%0004d.pdb" % id)
    PDB().write(total_group, "test_total_%0004d.pdb" % id)

print("Running a simulation...")

for i in range(1,11):
    system = moves.move(system, 2000, True)

    nrgmon = system.monitor( MonitorName("solute_shell") )

    PDB().write(system.molecules(), "test_sim_%0004d.pdb" % i)

    system.clearStatistics()

    print("Step %d of 10: Energy = %s" % (i, system.energy()))

    view(nrgmon, i)