dimchris / mdanalysis

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

set file format on a per-filename basis #76

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
At the moment (0.7.4) one can provide the format="xxx" keyword to Universe() as

 u = Universe(topology, traj, format="pdb")

to override the file format autodetection. But this does not work for the 
chained reader, i.e. 

 chained = Universe(topol, [file1, file2, ...])

We should also allow providing tuples (filename, format) instead of file names. 
Universe() should then use the information in tuple[1] to set the format. In 
this way one could do

 chained = Universe(topol, [("a.ent1", "pdb"), "start.dcd", ("last.trj", "dcd")]

Original issue reported on code.google.com by orbeckst on 9 Aug 2011 at 1:45

GoogleCodeExporter commented 9 years ago
(Feel free to work on this, just set your name as owner. Thanks.)

Original comment by orbeckst on 19 Nov 2011 at 4:09

GoogleCodeExporter commented 9 years ago
I will take it if nobody is working on it now.

Original comment by jjlight...@gmail.com on 18 Jul 2012 at 2:24

GoogleCodeExporter commented 9 years ago
Thanks for taking it on, Jinju. I added you as the issue owner.

See https://code.google.com/p/mdanalysis/wiki/DistributedDevelopment on how to 
work with clones of the MDAnalysis repository.

If you want to discuss something then let's do it through the comments of the 
issue; in this way there's a full record.

Cheers,
Oliver

Original comment by orbeckst on 18 Jul 2012 at 4:02

GoogleCodeExporter commented 9 years ago
Hi,

I pushed a modified branch into my 
clone:https://code.google.com/r/jjlights03-chainreaderformat. 
Coordinates/core.py and coordinates/base.py is modified and a testcase 
test_Issue76.py is included. 
Let me know whether it is working or there is anything need improvement.
Thanks!

Sincerely,
Jinju

Original comment by jjlight...@gmail.com on 21 Jul 2012 at 6:27

GoogleCodeExporter commented 9 years ago
I had a very cursory look at the code but did not run it. 

It looks very good. Can you do the following final adjustments:
- check that the test file is also checked in
- remove the commented out code that you replaced (git takes care of the 
history)
- integrate the test cases into test_coordinates.py (thematically it belongs 
with the coordinate readers)
- run ALL test cases to check that everything else is working
- add an entry to CHANGELOG and add yourself to AUTHORS and the 
doc/sphinx/conf.py file

Thanks a lot!

Original comment by orbeckst on 21 Jul 2012 at 5:19

GoogleCodeExporter commented 9 years ago
Jinju,

Finally found time to test the patch for Issue 76. All works fine --- nice work.

I did some minor cleanup
- removed the commented out code that you replaced (git takes care of the 
history)
- integrated the test cases into test_coordinates.py (thematically it belongs 
with the coordinate readers)
- ran ALL test cases: all good
- added jjlights03 to AUTHORS and the doc/sphinx/conf.py file and updated 
CHANGELOG

Many thanks!
Oliver

Original comment by orbeckst on 4 Aug 2012 at 6:56