Beispiel #1
0
    bond_lengths=bond_lengths,
    bond_force_constants=bond_force_constants,
    torsion_force_constants=torsion_force_constants,
    equil_torsion_angles=equil_torsion_angles,
    torsion_periodicities=torsion_periodicities,
    include_nonbonded_forces=include_nonbonded_forces,
    include_bond_forces=include_bond_forces,
    include_bond_angle_forces=include_bond_angle_forces,
    include_torsion_forces=include_torsion_forces,
    constrain_bonds=constrain_bonds,
    positions=positions,
)

# Set parameters for definition/evaluation of native contacts
native_structure_contact_distance_cutoff = 1.05 * cgmodel.get_sigma(
    0
)  # This distance cutoff determines which nonbonded interactions are considered 'native' contacts
native_contact_cutoff_ratio = 1.1  # The distance ratio (in comparison with the distance of a contact in the native structure) below which a nonbonded interaction is considered 'native'

temperature = 400.0 * unit.kelvin
T_list = [temperature.__add__(i * 50.0 * unit.kelvin) for i in range(10)]

for temperature in T_list:
    print(
        str("Running a simulation with temperature = " +
            str(temperature._value)))
    output_directory = str("scan_T_output/" + str(temperature._value))
    if not os.path.exists(output_directory):
        os.mkdir(output_directory)

    run_simulation(
Beispiel #2
0
        total_simulation_time=total_simulation_time,
        print_frequency=print_frequency,
        output_data=output_data,
    )
    make_replica_pdb_files(cgmodel.topology, replica_positions)


native_structure = get_native_structure(replica_positions, replica_energies, temperature_list)

random_poses, random_pose_energies = get_decorrelated_samples(
    replica_positions, replica_energies, temperature_list
)

# Set parameters for definition/evaluation of native contacts
native_structure_contact_distance_cutoff = 1.05 * cgmodel.get_sigma(
    0
)  # This distance cutoff determines which nonbonded interactions are considered 'native' contacts
native_contact_cutoff_ratio = 1.1  # The distance ratio (in comparison with the distance of a contact in the native structure) below which a nonbonded interaction is considered 'native'

cutoff_list = [(1.0 + i * 0.01) * cgmodel.get_sigma(0) for i in range(30)]

list_fraction_native_contacts = []

for cutoff in cutoff_list:
    # Get the number of nonbonded interactions that will be considered 'native'

    # Get the fraction of native contacts for the comparison pose
    nonnative_ensemble_Q_list = []
    for pose in random_poses:
        Q = fraction_native_contacts(
            cgmodel,