-
Notifications
You must be signed in to change notification settings - Fork 825
Closed
Labels
Component-ReadersFormat-ChainReaderChainReader virtual trajectory readerChainReader virtual trajectory reader
Description
Expected behavior
u = mda.Universe(PDB, [PDB, PDB, PDB], format=my_custom_pdb_reader)
reads in my strange PDB files with my custom PDB reader.
Actual behavior
format: str, ``None``, default ``None``
Provide the file format of the coordinate or trajectory file; ``None``
guesses it from the file extension. Note that this keyword has no
effect if a list of file names is supplied because the "chained" reader
has to guess the file format for each individual list member.
Can also pass a subclass of :class:`MDAnalysis.coordinates.base.ProtoReader`
to define a custom reader to be used on the trajectory file.
Any list of filenames is passed to the ChainReader, resulting in the normal MDAnalysis PDB reader instead of my custom one.
Current version of MDAnalysis
- Which version are you using?
0.19.3-dev
Suggested fix
In the core._get_readers.get_reader_for function, pass on the format argument into ChainReader. In ChainReader, use it for self.readers[].
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component-ReadersFormat-ChainReaderChainReader virtual trajectory readerChainReader virtual trajectory reader