Code Monkey home page Code Monkey logo

hop's People

Contributors

dotsdl avatar iwelland avatar orbeckst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hop's Issues

Density.export3D() broken

Some issue with newer version of the Bio.PDB writer:

In [44]: density.export3D()
S --> ?
S --> ?
...
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)

/Volumes/Data/oliver/Biop/Projects/WaterNetworks/testcases/2IFB/analysis/ in ()

/Volumes/Data/oliver/Biop/Library/python/Hop/hop/sitemap.pyc in export3D(self, filename, site_labels)
   1300 
   1301         self._write_psf(filename,site_labels)       # atoms are numbered consecutively...
-> 1302         self._write_pdb(filename,site_labels)       # ..and residues correspond to sites
   1303         self._write_vmd(filename,site_labels)       # tcl code for labels in VMD
   1304 

/Volumes/Data/oliver/Biop/Library/python/Hop/hop/sitemap.pyc in _write_pdb(self, filename, site_labels)
   1334         io.set_structure(s)
   1335         pdbfile = self.filename(filename,'pdb')
-> 1336         io.save(pdbfile)
   1337 
   1338     def _write_psf(self,filename,site_labels):

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Bio/PDB/PDBIO.pyc in save(self, file, select, write_end)
    154                             model_residues_written=1
    155                             s=get_atom_line(atom, hetfield, segid, atom_number, resname,
--> 156                                 resseq, icode, chain_id)
    157                             fp.write(s)
    158                             atom_number=atom_number+1

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Bio/PDB/PDBIO.pyc in _get_atom_line(self, atom, hetfield, segid, atom_number, resname, resseq, icode, chain_id, charge)
     76             element = atom.element.strip().upper()
     77             if len(atom.element) > 2 or not element.isalpha():
---> 78                 raise ValueError("Unrecognised element %s" % repr(atom.element))
     79             element = element.rjust(2)
     80         else:

ValueError: Unrecognised element '?'
> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Bio/PDB/PDBIO.py(78)_get_atom_line()
     77             if len(atom.element) > 2 or not element.isalpha():
---> 78                 raise ValueError("Unrecognised element %s" % repr(atom.element))
     79             element = element.rjust(2)

add editor hint lines to all source files

To ensure minimum coding style: add

# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8

visualization of hopping network

via @iorga:

How can we visualize the network encoded by the file hopgraph.xgmml ? I tried with Cytoscape, it recognizes the columns etc, but the drawing shows only one big rectangle.

I also installed graphviz, but I'm not sure about how to use the modules, like "dot" for example. Is it correct to type

dot -Tpng -o x.png test.xgmml

The result is :

Warning: test.xgmml: syntax error in line 1 near '>'

Or do I have to format the xgmml file into a specific format ?

checking calculated rates for the manual test

The current manual testing protocol contains a short (0.5 ns) trajectory of I-FABP. The rates that come out of running it through hop are not very believable, see discussion following #11 (comment).

We want to figure out if these rates are correctly calculated but just not converged or if there's a deeper problem.

(This is also important if we want to use a short version of the test trajectory for proper tests #2.)

HeatmapAnalysis missing keys

In [66]: hm = HeatmapAnalysis(cg)

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

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

/mnt/denniej0/1l2x/namd_alex3/analysis/build/bdist.linux-i686/egg/hop/analysis.py in init(self, hoppinggraphs, normalization, verbosity, prune)

<type 'exceptions.AttributeError'>: 'CombinedGraph' object has no attribute 'keys'

documentation

Currently, the sphinx docs do not build correctly with a weird

RuntimeError: sys.path must be a list of directory names

Need be fixed.

CombinedGraph plotting

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}

alpha 1 release: no transitions detected

I ran the tests https://github.com/Becksteinlab/hop/wiki/Testing (see also #11) but no transitions are detected, even though earlier versions showed them.

(hop) yngvi:TESTING oliver$ ./HOP_TESTRUN.sh
MDAnalysis  : INFO     MDAnalysis 0.18.0 STARTED logging to 'MDAnalysis.log'
Histogramming bulk=3036 solvent=3444  atoms in frame   500/500  [100.0%]
/Users/oliver/anaconda3/envs/hop/lib/python2.7/site-packages/numpy/core/fromnumeric.py:2909: RuntimeWarning: Mean of empty slice.
  out=out, **kwargs)
/Users/oliver/anaconda3/envs/hop/lib/python2.7/site-packages/numpy/core/_methods.py:80: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
MDAnalysis  : INFO     MDAnalysis STOPPED logging
MDAnalysis  : INFO     MDAnalysis 0.18.0 STARTED logging to 'MDAnalysis.log'
MDAnalysis.app: INFO     Generating hopping trajectory for density 'analysis/water.pickle'
Mapping frame   500/   500  [100.0%]
MDAnalysis.analysis.hop.trajectory: INFO     HoppingTrajectory.write(): wrote hoptraj 'analysis/hoptraj.dcd'.
MDAnalysis.analysis.hop.trajectory: INFO     HoppingTrajectory.write(): wrote hoppsf 'analysis/hoptraj.psf'.
MDAnalysis.app: INFO     Created hopping trajectory analysis/hoptraj.dcd with analysis/hoptraj.psf
MDAnalysis  : INFO     MDAnalysis STOPPED logging
MDAnalysis  : INFO     MDAnalysis 0.18.0 STARTED logging to 'MDAnalysis.log'
MDAnalysis.app: INFO     Generating hopping graph from trajectory '/Volumes/Data/oliver/Biop/Projects/Bogdan/TESTING/analysis/hoptraj.psf'/'/Volumes/Data/oliver/Biop/Projects/Bogdan/TESTING/analysis/hoptraj.dcd' ...
Analyzing hops: frame   500/500  [100.0%]
MDAnalysis.analysis.hop.graph: INFO     Building hopping graph with rate constants k1, k2 or k.
MDAnalysis.analysis.hop.graph: INFO     (Ignore 'Warning: ... maxfev = 800': then a single k is chosen automatically.)
MDAnalysis.app: INFO     Saved hopgraph as analysis/hopgraph.pickle
No handlers could be found for logger "hop.interactive"
/Users/oliver/anaconda3/envs/hop/lib/python2.7/site-packages/hop/graph.py:924: MissingDataWarning: Filtered graph contains no transitions: no plots available
  warnings.warn(msg, category=MissingDataWarning)
MDAnalysis.analysis.hop.graph: WARNING  Filtered graph contains no transitions: no plots available
MDAnalysis.app: INFO     Created hopping graph analysis/hopgraph.pickle and other files
MDAnalysis  : INFO     MDAnalysis STOPPED logging

trajectories are assumed to have skip_timestep/delta properties?

In density.py, lines 149-155 assume that the MD trajectory will have the properties mentioned in the subject. My local version just has try/except clauses added to get around this since all that code is doing is determining metadata that as far as I can tell is not used for the Hop process.

easy_install from tar ball fails

Installing the package directly from the tar ball should work but doesn't:

easy_install Hop-0.3.0.tar.gz 

Gives the error message
Processing Hop-0.3.0.tar.gz
Running Hop-0.3.0/setup.py -q bdist_egg --dist-dir /var/folders/ja/jaE1z6Zo2RaPfE+F75CkvU+++TM/-Tmp-/easy_install-2eLMhS/Hop-0.3.0/egg-dist-tmp-ED49ho
The required version of setuptools (>=0.6c11) is not available, and can't be installed
while this script is running. Please install a more recent version first, using
'easy_install -U setuptools'.
(Currently using setuptools 0.6c9 (/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python))
error: Setup script exited with 2

The same error appears even after upgrading setuptools.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.