We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a1eea9 commit 9936003Copy full SHA for 9936003
dpdata/system.py
@@ -810,6 +810,11 @@ def perturb(self,
810
perturbed_system : System
811
The perturbed_system. It contains `pert_num` * frame_num of the input system frames.
812
"""
813
+ if type(self) is not dpdata.System:
814
+ raise RuntimeError(
815
+ f'Using method perturb() of an instance of {type(self)}. '
816
+ f'Must use method perturb() of the instance of class dpdata.System.'
817
+ )
818
perturbed_system = System()
819
nframes = self.get_nframes()
820
for ii in range(nframes):
0 commit comments