Coverage for biobb_mem/fatslim/common.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.6.11, created at 2025-02-10 11:25 +0000

1from MDAnalysis.transformations.boxdimensions import set_dimensions 

2 

3 

4def calculate_box(u): 

5 print('Setting box dimensions using the minimum and maximum positions of the atoms.') 

6 # Calculate the dimensions of the box 

7 positions = u.atoms.positions 

8 box_dimensions = positions.max(axis=0) - positions.min(axis=0) 

9 u.trajectory.add_transformations(set_dimensions([*box_dimensions, 90, 90, 90]))