Skip to content

Default arg for frame number to be analysed is zero: "ZeroDivisionError: float division by zero" #123

@Pippetta87

Description

@Pippetta87

Hi, I get an error "ZeroDivisionError: float division by zero" when I run on python console:

>>>gist=sm.GridWaterAnalysis("npt_nojump_protmasshoh.gro","md_0_10_protmass_hoh_nojump.xtc",supporting_file="topol_protmasshoh.top",ligand_file="docking/curcumin_bondnorot_model1.pdb",grid_dimensions=[40, 40, 40],prefix="cur")
>>> gist.calculate_grid_quantities()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/myuser/micromamba/envs/sstmap_py36/lib/python3.6/site-packages/sstmap/utils.py", line 50, in function_timer
    result = function(*args, **kwargs)
  File "/home/myuser/micromamba/envs/sstmap_py36/lib/python3.6/site-packages/sstmap/grid_water_analysis.py", line 435, in calculate_grid_quantities
    print_progress_bar(0, self.num_frames)
  File "/home/myuser/micromamba/envs/sstmap_py36/lib/python3.6/site-packages/sstmap/utils.py", line 74, in print_progress_bar
    filled_len = int(round(bar_len * count / float(total)))
ZeroDivisionError: float division by zero

The defaul number of frames to be analysed should be all the frames?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions