Coverage for gamdpy/tools/ConfigurationIO.py: 62%

24 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2025-06-14 15:55 +0200

1# This class is used for loading and saving configurations  

2# Can be also used to convert between output formats (rumd3 -> gamdpy supported so far) 

3import sys 

4import numpy as np 

5import os 

6from gamdpy import Configuration 

7 

8class ConfigurationIO(): 

9 """ 

10 This class handles loading and saving of gumdpy configuration object. 

11 The default saving is as .h5 but it's possible to convert to different formats. 

12 

13 Paramters 

14 --------- 

15 

16 configuration : Configuration 

17 Configuration object to save 

18 

19 output_name : 

20 Name of the output file 

21 

22 output_format : str 

23 String describing the type of outfile desired 

24 

25 Examples 

26 -------- 

27 """ 

28 

29 import h5py 

30 

31 def __init__(self, configuration: Configuration, output_name: str, output_format: str, input_name: str): 

32 return 

33 

34 def __save__(self): 

35 return 

36 

37 def __load__(self): 

38 return 

39 

40 def save_as_h5(self): 

41 return 

42 

43 def save_as_xyz(self): 

44 return 

45 

46 def save_as_lammps(self): 

47 return 

48 

49 def load_from_h5(self): 

50 return 

51 

52 def load_from_xyz(self): 

53 return 

54 

55 def load_from_lammps(self): 

56 return