Using the line, ptop.save("out.lammps"), if topologies are converted to say LAMMPSHarmonicAngles, then those conversions are done in place. If you try to write out to say ptop.save("out.top"), after, it will raise an error that the potentials are not in the correct form. I would suggest a fix for that would be to not perform the conversions of the topology in place, potentially just making a copy of the topology for handling during the writing. This also needs to be tested though on larger systems, where the deepcopy can be a slower step in the writing.