diff --git a/src/main/java/org/openmolecules/pdb/MMTFParser.java b/src/main/java/org/openmolecules/pdb/MMTFParser.java index 809759a..d37afed 100755 --- a/src/main/java/org/openmolecules/pdb/MMTFParser.java +++ b/src/main/java/org/openmolecules/pdb/MMTFParser.java @@ -30,6 +30,8 @@ import java.nio.file.Paths; import java.util.TreeMap; +@Deprecated // MMTF is not supported anymore by the PDB database from July 2nd, 2024 (a pity, because for us, + // it is much more useful than its more bulky replacement binaryCIF, because it included bonds! public class MMTFParser { public static final int MODE_DONT_SPLIT = 0; public static final int MODE_SPLIT_MODELS = 1; @@ -235,9 +237,22 @@ else if (mode == MODE_SPLIT_CHAINS) { for (StereoMolecule mol:molecule) mol.setName((mol.getName() == null ? "" : mol.getName() + " ") + new MolecularFormula(mol).getFormula()); + for (StereoMolecule mol:molecule) + addMissingCharges(mol); // in some molecules quarternary nitrogen atoms are not charged, e.g. 8BXH + return molecule; } + private static void addMissingCharges(StereoMolecule mol) { + mol.ensureHelperArrays(Molecule.cHelperNeighbours); + for (int atom=0; atom