Fixing instances names when writing gmx files.