noid-group / BOCS

Bottom-up Open-source Coarse-graining Software
15 stars 5 forks source link

update of info flags for first frame #4

Closed JFRudzinski closed 5 years ago

JFRudzinski commented 5 years ago

(Unless I am misunderstanding something!), I think there is a missing update of the info flags for the first frame of each structure file.

For all frames except the first, we set the info flags by calling in cgff.c: read_trr_2_CGstruct (&info, fr, CG_struct); which then calls in gromacs_topology.c: copy_trr_2_CGstruct(fr, CG_struct); update_info_trr(info, fr);

However, for the first frame we only have in cgff.c (approx line 233): / Copy trr information to CG_struct. / bF = copy_trr_2_CGstruct (fr, CG_struct); we should also update the flags after this by adding: update_info_trr(&info, fr);

Otherwise, for the first frame the flags are all initialized to false (except b_Forces_N). This is usually not a significant problem, but it means that the forces from the first frame are always being ignored. This would be a problem if you are trying to process lots of very short structure files with forces.

mdelyser commented 5 years ago

You're right. thanks!