todo: implement pdb output and topology reading