From: tcofoegbu Date: Mon, 25 Jan 2016 15:06:26 +0000 (+0000) Subject: JAL-1998 bugfix for division by zero error for PDB entries with chain(s) consisiting... X-Git-Tag: Release_2_10_0~321 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3161be70bb06b580f12f9cef4b9e71cd6f71a38f;p=jalview.git JAL-1998 bugfix for division by zero error for PDB entries with chain(s) consisiting of a single residue --- diff --git a/src/MCview/PDBChain.java b/src/MCview/PDBChain.java index 6d5f9fe..a43626f 100755 --- a/src/MCview/PDBChain.java +++ b/src/MCview/PDBChain.java @@ -252,7 +252,7 @@ public class PDBChain * If > 99% 'P', flag as nucleotide; note the count doesn't include the last * residue */ - if (residues.size() > 0 && (numNa / (residues.size() - 1) > 0.99)) + if (residues.size() > 1 && (numNa / (residues.size() - 1) > 0.99)) { isNa = true; }