pwtools.io.ReadFactory¶
- class pwtools.io.ReadFactory(parser=None, struct_or_traj=None, doc='')[source]¶
Bases:
object
Factory class to construct callables to parse files.
- __init__(parser=None, struct_or_traj=None, doc='')[source]¶
- Parameters:
parser (one of parse.*File parsing classes)
struct_or_traj (str) – {‘struct’,’traj’} Whether the callables should return parser.get_{struct,traj}()’s return value.
doc (str) – docstring header
- __call__(filename, **kwds)[source]¶
- Parameters:
filename (str) – Name of the file to parse.
**kwds (keywords args) – passed to the parser class (e.g. units=…)
Methods