Closed SalomeRonja closed 1 year ago
Hmm, after a closer look, it should probably be df.rename(columns={"start": "ID"}, inplace=True)
instead of my original suggestion df.rename(columns={"coord_ID": "ID"}, inplace=True)
There is also an issue with the indices: in the previous repdat format, all indices started at 1, which is taken into account e.g. in the transition_dict
member function _caculate_transition_traces
of the Repdat
class. In the new repdat format, on the other hand, the indices start at 0, so e.g. transition_dict[int(row.ID)])
leads to a KeyError for row.ID=0
. Mŷ solution for now is to just increase the corresponding indices in the new repdat file during the parsing:
if min(df.ID) == 0:
for i in range(0, len(df.pos)):
df.pos[i] = df.loc[i]['pos']+1
df.ID[i] = df.loc[i]['ID']+1
df.coord_ID[i] = df.loc[i]['coord_ID']+1
df.partner[i] = df.loc[i]['partner']+1
df.partner_start[i] = df.loc[i]['partner_start']+1
df.partner_coord_ID[i] = df.loc[i]['partner_coord_ID']+1
But in the long run, when we move towards using only the new code, we should clean this up and adapt the repdat-dependent functions to the new format
adding to the TODO list: the function edit_REEDS
in imd.py
is currently not writing the energy offsets correctly for the new imd format- maybe also some of the other variables -> I'll need to check which edits work and fix the ones that don't work
can be fixed by changing elif(isinstance(reeds_block, blocks.REPLICA_EDS)):
to elif(isinstance(reeds_block, blocks.NEW_REPLICA_EDS)):
in edit_REEDS
I'll make a new branch with all these changes :)
Another thing to keep in mind is how to do the automatic adaptation of the imds for the new NEOFF parameter, which is not done at the moment. I'll add it to the new branch as well
I started a pull request in the pygromos submodule which should fix these issues: https://github.com/rinikerlab/PyGromosTools/pull/79
I'd still like to keep the issue open, since we should adapt to the new repdat format completely, when we stop using the old gromosXX code
was merged :)
sorry just read the last sentence of your post
Yeah, it's low priority, but now that we're making the switch to the new code/repdat format, I think it would be nicer if we avoided the work of increasing all the replica indices in the repdat, and directly used the indices starting at 0 instead of 1 for the whole s-optimization analysis.
@SalomeRonja Do you still want to keep this issue open? I think everyone has been using the new gromosXX code and repdat file fomat/parser now and it's been working well.
I'm not sure if the indexing change you mention was done or not though.
In the new parallel GromosXX RE-EDS code, the format of the repdat output file changed slightly. When a new repdat is parsed with the pygromos file parser, I get the following error message:
The issue can be solved by doing the renaming
df.rename(columns={"coord_ID": "ID"}, inplace=True)
.What I don't understand is line
df.rename(columns={"exch": "s"}, inplace=True)
. In the old repdat format, there is a column calledexch
, which contains booleans that encode whether the exchange between two replicas was accepted or rejected. The same column is still present in the new format, and it doesn't correspond to the s-values. @SchroederB do you know what the idea behind this is?