XzzX / mrmd

Multi Resolution Molecular Dynamics
Apache License 2.0
1 stars 2 forks source link

Implement gro output for other systems than water #23

Open J-Hizzle opened 2 weeks ago

J-Hizzle commented 2 weeks ago

Changed the .gro file output to take residue name and atom type as user parameters, so that other systems than water may be printed to .gro files. Also wrote test and minimal example. However, output for water is somewhat broken at the moment due to indexing issues with residue sizes > 1. This would need to be reworked in the future.

Resolves #22

XzzX commented 2 weeks ago

And we need to make sure all existing usages work correctly with the changes.

XzzX commented 2 weeks ago

What happens if the strings exceed the character limit of 5? I am ok with either truncating it or throwing an error.

J-Hizzle commented 2 weeks ago

What happens if the strings exceed the character limit of 5? I am ok with either truncating it or throwing an error.

I would prefer throwing an error for clarity of use.

J-Hizzle commented 2 weeks ago

We should link this PR to Issue #22. All my commits are also marked with it's number.

XzzX commented 2 weeks ago

We should link this PR to Issue #22. All my commits are also marked with it's number.

https://docs.github.com/de/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue

XzzX commented 2 weeks ago

What happens if the strings exceed the character limit of 5? I am ok with either truncating it or throwing an error.

You can use something like this:
MRMD_HOST_CHECK_LESSEQUAL(..., ..., fmt::format("..."))
This will print a nice error message.