Repository navigation
Closed
Labels
good first issueThis should be an easy fix, suitable for beginners
Description
test_PDB_PDBIO ... /Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'NA' for Atom (name=NA) with given element 'A'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/PDBIO.py:50: PDBIOWarning: Truncated bfactor 1000009 to 999999 to fit wwPDB spec. Consider using mmCIF instead!
warnings.warn(
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/PDBIO.py:50: PDBIOWarning: Truncated bfactor 1000009 to 999999 to fit wwPDB spec. Consider using mmCIF instead!
warnings.warn(
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/PDBIO.py:50: PDBIOWarning: Truncated bfactor 1000009 to 999999 to fit wwPDB spec. Consider using mmCIF instead!
warnings.warn(
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/PDBIO.py:50: PDBIOWarning: Truncated bfactor 1000009 to 999999 to fit wwPDB spec. Consider using mmCIF instead!
warnings.warn(
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/PDBIO.py:50: PDBIOWarning: Truncated bfactor 1000009 to 999999 to fit wwPDB spec. Consider using mmCIF instead!
warnings.warn(
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/Atom.py:237: PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E'
warnings.warn(msg, PDBConstructionWarning)
/Users/peterjc/miniforge3/envs/pyani-plus_py312/lib/python3.12/site-packages/Bio/PDB/PDBIO.py:50: PDBIOWarning: Truncated bfactor 1000009 to 999999 to fit wwPDB spec. Consider using mmCIF instead!
warnings.warn(
ok
The PDBConstructionWarning: Used element 'SE' for Atom (name=SE) with given element 'E' ones are a very old warning, so this is likely from adding a new test PDB file, and was missed in review.
The PDBIOWarning: Truncated bfactor ones are likely from #5047 and missed in review.
Metadata
Metadata
Assignees
Labels
good first issueThis should be an easy fix, suitable for beginners
Activity
peterjc commentedon Oct 15, 2025
The fix should be something like 758c6ae where these warnings are triggered.
sneharaghuram commentedon Oct 23, 2025
Hello, I'm a first time contributor (but used BioPython before) and would like to be assigned this issue, if it hasn't gone to someone else already.
peterjc commentedon Oct 23, 2025
Great - please have a go @sneharaghuram - thanks!
peterjc commentedon Oct 28, 2025
To narrow down where the warnings are from, run the problem file directly (in the tests directory):
So lots, but most in
test_pdbio_write_high_b_factor.peterjc commentedon Oct 28, 2025
This suppresses the warnings in that test:
I couldn't work out if
warnings.filterwarningcould be used instead with a regex to matchUsed element 'SE' for Atom (name=SE) with given element 'E'which would be more specific.peterjc commentedon Oct 28, 2025
I ended up doing this myself as I wanted it fixed for #5062, sorry.