def test_MC_analysis(self):

        initial_u = [
            -14080.7, -14290.6, -14295.4, -14300.8, -14312.3, -14317.9,
            -14319.1, -14329.3, -14332.2, -14339.8, -14342.8, -14341.1
        ]
        final_u = [
            -14290.6, -14295.4, -14300.8, -14312.3, -14317.9, -14319.1,
            -14329.3, -14332.2, -14339.8, -14342.8, -14341.1, -14340.1
        ]

        data = {
            "e_after": numpy.array(final_u),
            "e_before": numpy.array(initial_u)
        }

        print process_energy_differences(data)
示例#2
0
    (options, args) = parser.parse_args()

    folders = [
        "IC_dispFact_0.65_dm_1", "IC_dispFact_0.65_dm_2",
        "IC_dispFact_0.65_dm_3", "IC_dispFact_0.65_dm_4",
        "IC_dispFact_0.65_dm_5", "IC_dispFact_0.65_dm_6",
        "IC_dispFact_0.65_dm_7", "IC_dispFact_0.65_dm_8",
        "IC_dispFact_0.65_dm_9", "IC_dispFact_0.65_dm_10"
    ]

    distances = {}
    for folder in folders:
        raw_data, min_len = load_single_proc_data(options.sim_type,
                                                  os.path.join(folder, "info"))

        energy_increments = process_energy_differences(raw_data)
        mc = MetropolisMCSimulator(energy_increments)

        who_is_accepted = mc.who_is_accepted(options.temperature)

        coords = numpy.reshape(raw_data["coords_after"],
                               (len(raw_data["coords_after"]),
                                len(raw_data["coords_after"][0]) / 3, 3))
        distances[folder] = calc_distances(coords, range(
            len(coords)))  #who_is_accepted[:150])

    sns.set_style("whitegrid")
    row_len = 4
    col_len = 3
    folders.extend(["IC_dispFact_0.65_dm_10", "IC_dispFact_0.65_dm_10"])
    f, axes = prepare_subplots(row_len, col_len)