Becksteinlab / hop

Solvent network analysis. Hop is a python package based on MDAnalysis to analyze solvation dynamics.
https://hop.readthedocs.io
GNU General Public License v3.0
14 stars 5 forks source link

CombinedGraph plotting #3

Closed denniej0 closed 14 years ago

denniej0 commented 14 years ago

When the 2 (h and h_ref) networks are combined and then trying to graph them

In [70]: cg = hop.graph.CombinedGraph(g0=h,g1=h_ref) In [71]: cg.plot(0,'cg_h',linewidths=(0.01,))

<type 'exceptions.ValueError'> Traceback (most recent call last)

/mnt/denniej0/1l2x/namd_alex3/analysis/ in ()

/mnt/denniej0/1l2x/namd_alex3/analysis/build/bdist.linux-i686/egg/hop/graph.py in plot(self, igraph, filename, format, use_filtered_graph, label_sites, prog, cmap, max_node_size, interactive, **drawargs)

/mnt/denniej0/1l2x/namd_alex3/analysis/build/bdist.linux-i686/egg/hop/graph.py in select_graph(self, use_filtered_graph)

<type 'exceptions.ValueError'>: No filtered graph defined; create one with CombinedGraph.filter().

The h and h_ref stats show the following:

In [63]: h_ref.stats() Out[63]: {'G_degree': 14.352941176470589, 'G_degree_in': 7.1764705882352944, 'G_degree_in_max': 203, 'G_degree_in_min': 1, 'G_degree_in_nobulk': 6.2118226601, 'G_degree_in_nobulk_max': 23, 'G_degree_in_nobulk_min': 1, 'G_degree_max': 406, 'G_degree_min': 2, 'G_degree_nobulk': 12.423645320197044, 'G_degree_nobulk_max': 44, 'G_degree_nobulk_min': 2, 'G_degree_out': 7.1764705882352944, 'G_degree_out_max': 203, 'G_degree_out_min': 1, 'G_degree_out_nobulk': 6.2118226601, 'G_degree_out_nobulk_max': 22, 'G_degree_out_nobulk_min': 1, 'G_edges': 1464, 'G_edges_nobulk': 1261.0, 'G_internal': 0, 'G_isolated': 0, 'G_order': 204, 'G_order_nobulk': 203, 'site_N_equivalence_sites': 3, 'site_N_subsites': 3, 'site_lifetime_avg': 16.3956265762, 'site_lifetime_max': 520.0, 'site_lifetime_med': 10.9756097561, 'site_lifetime_min': 9.88235294118, 'site_lifetime_std': 36.3143549497, 'site_occupancy_kin_avg': 0.288865545357, 'site_occupancy_kin_max': 3.81550801001, 'site_occupancy_kin_med': 0.171122994142, 'site_occupancy_kin_min': 0.045454545319, 'site_occupancy_kin_std': 0.400538382202, 'site_occupancy_rho_avg': 0.295487473986, 'site_occupancy_rho_med': 0.177807486631, 'site_occupancy_rho_std': 0.408680025598, 'site_volume_avg': 4.65500820728, 'site_volume_med': 2.0}

In [64]: h.stats() Out[64]: {'G_degree': 14.617647058823529, 'G_degree_in': 7.3088235294117645, 'G_degree_in_max': 203, 'G_degree_in_min': 1, 'G_degree_in_nobulk': 6.34482758621, 'G_degree_in_nobulk_max': 23, 'G_degree_in_nobulk_min': 1, 'G_degree_max': 406, 'G_degree_min': 2, 'G_degree_nobulk': 12.689655172413794, 'G_degree_nobulk_max': 46, 'G_degree_nobulk_min': 2, 'G_degree_out': 7.3088235294117645, 'G_degree_out_max': 203, 'G_degree_out_min': 1, 'G_degree_out_nobulk': 6.34482758621, 'G_degree_out_nobulk_max': 23, 'G_degree_out_nobulk_min': 1, 'G_edges': 1491, 'G_edges_nobulk': 1288.0, 'G_internal': 0, 'G_isolated': 0, 'G_order': 204, 'G_order_nobulk': 203, 'site_N_equivalence_sites': 203, 'site_N_subsites': 203, 'site_lifetime_avg': 16.5140403744, 'site_lifetime_max': 520.0, 'site_lifetime_med': 11.0880829016, 'site_lifetime_min': 9.87951807229, 'site_lifetime_std': 36.5261078654, 'site_occupancy_kin_avg': 0.304829297582, 'site_occupancy_kin_max': 3.98997325014, 'site_occupancy_kin_med': 0.179812833689, 'site_occupancy_kin_min': 0.0548128340612, 'site_occupancy_kin_std': 0.42739504416, 'site_occupancy_rho_avg': 0.295487473986, 'site_occupancy_rho_med': 0.177807486631, 'site_occupancy_rho_std': 0.408680025598, 'site_volume_avg': 4.65500820728, 'site_volume_med': 2.0}

orbeckst commented 14 years ago

Create a filtered graph first: cg.filter(....)