#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 28 16:20:16 2020

@author: rob
"""

import hinge_analysis_lib
import FFEA_rod

def auto():
    
    # load trajectories
    mt_no_hinge = FFEA_rod.FFEA_rod("../traj/mt_no_hinge/run1/ndc80c_mt_multi.ffea")
    mt_hinge = FFEA_rod.FFEA_rod("../traj/mt_hinge/run1/ndc80c_mt_multi.ffea")
    #no_mt_no_hinge = FFEA_rod.FFEA_rod("../traj/no_mt_no_hinge/...")
    no_mt_hinge = FFEA_rod.FFEA_rod("../traj/no_mt_hinge/run7/ndc80c.ffea")
    
    # compare bend angles for hingeda and unhinged on the MT
    # compare bend angles hinged and unhinged off the mT
    # compare the bend angles for hinged both on and off the MT
    

    
    
    
    destination_angles = hinge_analysis_lib.get_hinge_bend_angles(destination_rod, 4, 9, end_index=-2)
    source_bins, source_values = hinge_analysis_lib.get_angle_distribution(source_angles, scatter_plot_mode = True)
    hinge_analysis_lib.plot_angle_distribution([source_bins, destination_bins, experimental_bins], [source_values, destination_values, experimental_values], ["Atomistic MD with AMBER", "Elastic rod simulation", "Experimental data"], ["-", "--", "-."])

    # note: possibly import heatmap and make both the heatmaps and the radius histograms here
    # compare the radius histograms for hinged, unhinged
    # compare the heatmaps for hinged, unhinged