Coder Social home page Coder Social logo

mdreader's People

Contributors

jbarnoud avatar mnmelo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mdreader's Issues

fork under MDAnalysis org?

@mnmelo what do you think about forking mdreader into the MDAnalysis org? In this way it gains visibility and MDAnalysis users can discover it?

Ideally, you'd push changes to the fork, too, so that the MDAnalysis/mdreader repo is also current.

Nicer error message when a file is missing

If a program that relies on MDreader is called without -f, -s, or -n, then the program fails during do_parse whith a python traceback.

The message for a missing -f looks like:

Traceback (most recent call last):
  File "./count_between.py", line 22, in <module>
    md = user_cli()
  File "./count_between.py", line 18, in user_cli
    md.do_parse()
  File "/home/jon/Envs/dev2/local/lib/python2.7/site-packages/MDreader/mdreader.py", line 483, in do_parse
    map(check_file,(self.opts.topol,)+tuple(self.opts.infile))
  File "/home/jon/Envs/dev2/local/lib/python2.7/site-packages/MDreader/mdreader.py", line 63, in check_file
    raise IOError('Can\'t find file %s' % (fname))
IOError: Can't find file t

The message for a missing -s looks like:

Traceback (most recent call last):
  File "./count_between.py", line 22, in <module>
    md = user_cli()
  File "./count_between.py", line 18, in user_cli
    md.do_parse()
  File "/home/jon/Envs/dev2/local/lib/python2.7/site-packages/MDreader/mdreader.py", line 483, in do_parse
    map(check_file,(self.opts.topol,)+tuple(self.opts.infile))
  File "/home/jon/Envs/dev2/local/lib/python2.7/site-packages/MDreader/mdreader.py", line 63, in check_file
    raise IOError('Can\'t find file %s' % (fname))
IOError: Can't find file topol.tpr

And the message for a missing -n looks like:

Traceback (most recent call last):
  File "./count_between.py", line 22, in <module>
    md = user_cli()
  File "./count_between.py", line 18, in user_cli
    md.do_parse()
  File "/home/jon/Envs/dev2/local/lib/python2.7/site-packages/MDreader/mdreader.py", line 500, in do_parse
    self._parse_ndx()
  File "/home/jon/Envs/dev2/local/lib/python2.7/site-packages/MDreader/mdreader.py", line 512, in _parse_ndx
    self._get__ndx_atgroups()
  File "/home/jon/Envs/dev2/local/lib/python2.7/site-packages/MDreader/mdreader.py", line 923, in _get__ndx_atgroups
    resnames = numpy.unique(self.atoms.resnames())
TypeError: 'numpy.ndarray' object is not callable

MDreader could display a more human friendly error message.

Optionnally prevent automatic index group selection

If an index file is read with the add_ndx method, and that index file contains the number of groups that is expected, then the interactive selection process is skipped and all the groups are read. This is extremely convenient when the order of the groups does not matter. When the order of the groups does matter, though, it can be surprising and lead to mistakes.

Maybe there could be a flag (in the command line or in the API, I do not know at what level it should be), to prevent MDreader to automatically select the groups.

Allow to select TPR default group when no index file is provided

When it expects an index file but that none is provided by the user, Gromacs allows to select groups among the default one read in the TPR. MDreader could do it too. This would require MDAnalysis to be able to read these default groups from the TPR, though.

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.