Write data during md run

Hello!

I wish to write data files during a simulation. I want the file to contain both coordinates and topology (like data file). It seems dump molfile is the closest but it does not contain bond info. What I have in mind is to do

wirte_data …
run …
write_data …
run …

This seems inefficient. Do you have any suggestion?

Thank you!
Yang

To dump bond topology during a simulation, you can use a combination of compute property/local, compute bond/local, and a dump local command.

Thank you for your reply!
I am aware of the compute + dump options but it only gives bonds info with no atom coordinates.
Is there a way to get a data file during a run or do I need to generate one by myself combining the dump file with a trajectory?

Thank you!

As far as I know, you can only output atom data and bond data separately during a run using two dump commands. If you then need the dump files combined in some particular format, that would have to be post processed.

Thank you very much!

Inefficient in which way?

You can automate the process by using the “every” keyword of the “run” command.

But the fundamental question is: does your system change beyond positions, velocities, and box geometry? If it doesn’t, there is no good reason to write out data files as a quasi-trajectory.

I am using fix create/bond so the topology is changing. “run every” will do! thank you very much.