Coverage for biobb_chemistry/test/unitests/test_acpype/test_acpype_amber2gmx.py: 94%
18 statements
« prev ^ index » next coverage.py v7.17.2, created at 2026-11-06 12:40 +0000
« prev ^ index » next coverage.py v7.17.2, created at 2026-11-06 12:40 +0000
1# type: ignore
2from importlib.metadata import version
3from biobb_common.tools import test_fixtures as fx
4from biobb_chemistry.acpype.acpype_convert_amber_to_gmx import acpype_convert_amber_to_gmx
7class TestAcpypeAmber2GMX():
8 def setup_class(self):
9 fx.test_setup(self, 'acpype_convert_amber_to_gmx')
11 def teardown_class(self):
12 fx.test_teardown(self)
13 pass
15 def test_amber2gmx(self):
16 acpype_convert_amber_to_gmx(properties=self.properties, **self.paths)
17 assert fx.not_empty(self.paths['output_path_gro'])
18 assert fx.not_empty(self.paths['output_path_top'])
19 assert fx.equal(self.paths['output_path_gro'], self.paths['ref_output_acpype_path_gro'])
20 # acpype < 2026.9.2 (only option for Python < 3.12) writes zero masses in [ atomtypes ]
21 if tuple(int(n) for n in version('acpype').split('.')[:3]) >= (2026, 9, 2):
22 ref_top = self.paths['ref_output_acpype_path_top']
23 else:
24 ref_top = self.paths['ref_output_acpype_path_top_massless']
25 assert fx.equal(self.paths['output_path_top'], ref_top)