Hi,
I recently encountered the following warning when running PDBFixer, despite having removed the "simtk" part when importing PDBFile: Warning: importing 'simtk.openmm' is deprecated. Import 'openmm' instead.
It seems that this is caused by "fixer.addMissingAtoms()", as "exit()" above this line doesn't produce the warning, but "exit()" one line down does.
I am using Windows 10, openmm 7.6.0 (conda-forge), and pdbfixer 1.8.1 (conda-forge), and have installed Anaconda via Anaconda3-2021.05-Windows-x86_64.exe. Strangely, no warning resulted when using 1fl5.pdb as input.
Hi, I recently encountered the following warning when running PDBFixer, despite having removed the "simtk" part when importing PDBFile: Warning: importing 'simtk.openmm' is deprecated. Import 'openmm' instead.
It seems that this is caused by "fixer.addMissingAtoms()", as "exit()" above this line doesn't produce the warning, but "exit()" one line down does.
I am using Windows 10, openmm 7.6.0 (conda-forge), and pdbfixer 1.8.1 (conda-forge), and have installed Anaconda via Anaconda3-2021.05-Windows-x86_64.exe. Strangely, no warning resulted when using 1fl5.pdb as input.
Here is the code, essentially as described (without simtk for importing PDBFile) here: https://htmlpreview.github.io/?https://github.com/openmm/pdbfixer/blob/master/Manual.html
from pdbfixer import PDBFixer from openmm.app import PDBFile
fixer = PDBFixer(filename='1ao7.pdb') # no warning with 1fl5.pdb fixer.findMissingResidues() fixer.findNonstandardResidues() fixer.replaceNonstandardResidues() fixer.removeHeterogens(True) fixer.findMissingAtoms() exit() # -> no warning fixer.addMissingAtoms() exit() # -> Warning: importing 'simtk.openmm' is deprecated. Import 'openmm' instead. fixer.addMissingHydrogens(7.0) PDBFile.writeFile(fixer.topology, fixer.positions, open('output.pdb', 'w'))
Thank you in advance for your help.