diff --git a/CHANGES b/CHANGES index dee0e09f..613ff8c5 100644 --- a/CHANGES +++ b/CHANGES @@ -30,6 +30,8 @@ Enhancements Fixes +* for mdpow.workflows.dihedrals.periodic_angle() implement .copy(deep=True) + to explicitly make a copy DataFrame of the data for angle padding (#242) * fix rcoulomb in CHARMM energy minimization MDP template file (PR #210) * fix ensemble.EnsembleAnalysis.check_groups_from_common_ensemble (#212) diff --git a/mdpow/workflows/dihedrals.py b/mdpow/workflows/dihedrals.py index a9ae5036..63b4d6a1 100644 --- a/mdpow/workflows/dihedrals.py +++ b/mdpow/workflows/dihedrals.py @@ -418,11 +418,11 @@ def periodic_angle(df, padding=45): ''' - df1 = df[df.dihedral > 180 - padding] + df1 = df[df.dihedral > 180 - padding].copy(deep=True) df1.dihedral -= 360 - df2 = df[df.dihedral < -180 + padding] + df2 = df[df.dihedral < -180 + padding].copy(deep=True) df2.dihedral += 360 - df_aug = pd.concat([df1, df, df2]).reset_index() + df_aug = pd.concat([df1, df, df2]).reset_index(drop=True) return df_aug