allow not using separate trajectory
In the current version initilize_universe we force MDAnlysis to load a trajectory. In some circumstances it is not necessary to load a separate trajectory, e.g. single frame analysis. Another example are LAMMPS dumps, which include the topology/trajectory.
Calling u = MDAnalysis.Universe(argobj.topology, argobj.trajectory)
, however requires to have a valid argobj.trajectory
.
I'm a bit clueless of how a proper solution looks like as MDAnalysis neither accepts empty lists nor None
for argobj.trajectory
(kwargs
of Universe
, see documentation). One possible solution would be to separate the Universe creation and the trajectory loading via
u.load_new(trajectory) # read from a new trajectory file
Any better ideas? @ploche, I guess this is more elegant than a simple if
statement?