dimchris / mdanalysis

Automatically exported from code.google.com/p/mdanalysis
0 stars 0 forks source link

hydrogen bonding analysis: improvements #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The hydrogen bonding analysis class in hbonds.py should be improved, in 
particular:

- Make it easier to handle different force fields (eg carbohydrates in addition 
to proteins).

- Selection of hydrogens has been fragile and this should be improved.

- Processing of data can still be difficult so providing better data structures 
and/or helpers to process the h-bond existence list would be welcome.

Lukas Grossar has already been doing an awful lot of this in his clone (and 
there are some minor improvements in orbeckst/hbonds). This Issue can act as a 
central hub for discussion relating to the hbonding analysis.

I am assigning the Issue to Lukas and he should tell either me (Oliver) or Séb 
when the changes should be pulled. 

(I won't merge orbeckst/hbonds to avoid any duplication – Lukas, please check 
if the latest changes to orbeckst/hbonds should (partially) go in your clone; I 
used your two patches and modified a bit but made the mistake of committing it 
all together.)

-- Oliver

Original issue reported on code.google.com by orbeckst on 20 Apr 2012 at 9:47

GoogleCodeExporter commented 9 years ago
Lukas,

I merged your updates in my hacking branch (the count_* methods are an awesome 
addition!) and worked a little bit on it (code simplification, docs, ..., see 
log).

You can pull changes from the Issue/103 branch in

  https://code.google.com/r/orbeckst-mdanalysis-hacking/

Séb, I deleted the orbeckst/hbonds feature branch in the main repository as 
per 
http://code.google.com/p/mdanalysis/wiki/DevelopmentWorkflow#feature_branches 
– we'll pull changes off of Lukas' clone once he says they are ready for the 
develop branch. 

Oliver

Original comment by orbeckst on 9 May 2012 at 7:10

GoogleCodeExporter commented 9 years ago
Ok,

once everything is ready, I think it will be time to prepare a new release.

Original comment by sebastie...@gmail.com on 10 May 2012 at 7:51

GoogleCodeExporter commented 9 years ago
Things that I think are still missing:
- Unit Tests for the new functions. I haven't had time to look into it for now.
- I'm not sure about the name count_by_type_correlation? Any other suggestions. 
It was a WIP name, until something better would come to my mind. ;)
- Any other functionality that you would wish to have?

I haven't had any good ideas of implementing the PyTables part in a clean way 
up to now, so we could push that back if to a later release if that would be ok 
for you.

Original comment by lukas.gr...@gmail.com on 10 May 2012 at 8:16

GoogleCodeExporter commented 9 years ago
*Any* kind of sensible UnitTests would be a big thing! It does not have to be 
exhaustive but at least test a few key features.

count_by_type_correlation --> timesteps_by_type

I would really like a way to save the full data and then come back later and 
analyze it (without providing the universe).

  hb = HydrogenBondAnalysis(universe,...)
  hb.run()
  hb.save("hb.dat")   # could be a pickle file or dumped numpy array

Then later

  hb = HydrogenBondAnalysis(filename="hb.dat")
  hb.count_by_type()

(Maybe it would be cleaner to have a hbonds.HydrogenBondAnalyzer class  for 
that job but I have used this pattern in some other code and found it quite 
convenient to be able to recreate the analysis elsewhere (=my laptop) without 
the need of trajectories)

The PyTables part can be easily pushed to a later release.

Original comment by orbeckst on 18 May 2012 at 9:18

GoogleCodeExporter commented 9 years ago
This issue was closed by revision f1b64de3ff6a.

Original comment by orbeckst on 5 Jun 2012 at 2:47

GoogleCodeExporter commented 9 years ago
Lukas,

I merged your develop branch, i.e. does not include the save feature. The last 
commit was 
http://code.google.com/r/lukasgrossar-mdanalysis-glycam/source/detail?r=98d55e07
af48de6eb13223f645656530079134f2&name=develop

The tests 

nosetests-2.6 -v test_analysis.py:TestHydrogenBondAnalysis  
test_analysis.py:TestHydrogenBondAnalysisHeuristic

currently fail and I have to look at this again. If you find anything that's 
obviously wrong let me know.

Thanks,
Oliver

Original comment by orbeckst on 5 Jun 2012 at 2:53

GoogleCodeExporter commented 9 years ago
Especially through Lukas' work we now have a very decent HBond analyzer and at 
least a minimum test case. For any further enhancements/bugs we'll open 
separate issues, so I am closing this one.

Original comment by orbeckst on 4 Jul 2012 at 8:24