Skip to content

Investigate runtime warnings from invalid var values in CPU correlator #72

@BSchilperoort

Description

@BSchilperoort

With files from https://www.bonvinlab.org/protein-detective/em_prepare.html I am getting warnings now

powerfit emd_33292-7xm9-B-3.48.cheated.mrc 3.3 7xm9.B-reoriented.gemmi.pdb  -a 20  -l -d run-KsgA-py3f2
Target file read from: /home/stefanv/git/protein-detective/protein-detective/docs/emd_33292-7xm9-B-3.48.cheated.mrc
Target resolution: 3.30
Initial shape of density: 99 71 61
Shape after trimming: 94 71 59
Shape after extending: 96 72 60
Template file read from: /home/stefanv/git/protein-detective/protein-detective/docs/7xm9.B-reoriented.gemmi.pdb
Reading in rotations.
Requested rotational sampling density: 20.00
Real rotational sampling density: 20.83
Requested number of processors: 1
Starting search
/home/stefanv/git/protein-detective/powerfit/src/powerfit_em/correlators/cpu.py:155: RuntimeWarning: invalid value encountered in sqrt
  self.lcc_scan = np.where(self.vars.lcc_mask, self.vars.gcc / np.sqrt(var), 0.0)
/home/stefanv/git/protein-detective/powerfit/src/powerfit_em/correlators/cpu.py:155: RuntimeWarning: divide by zero encountered in divide
  self.lcc_scan = np.where(self.vars.lcc_mask, self.vars.gcc / np.sqrt(var), 0.0)
/home/stefanv/git/protein-detective/powerfit/src/powerfit_em/correlators/cpu.py:155: RuntimeWarning: invalid value encountered in divide
  self.lcc_scan = np.where(self.vars.lcc_mask, self.vars.gcc / np.sqrt(var), 0.0)
Processing rotations 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 648/648  [ 0:00:16 < 0:00:00 , 39 rot/s ]
Time for search: 0m 19s
Analyzing results
Writing solutions to file.
Writing PDBs to file.
Total time: 0m 20s

The master branch does not show these errors, either solve or silence the warnings.

Originally posted by @sverhoeven in #66 (review)

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