-Before running PDBFixer, you must first install OpenMM 5.2 or later. Follow the installation instructions in the OpenMM manual. It is also highly recommended that you install CUDA or OpenCL. In principle PDBFixer can use the OpenMM reference platform, but it will be prohibitively slow. PDBFixer requires that NumPy be installed. +Before running PDBFixer, you must first install OpenMM 6.0 or later. Follow the installation instructions in the OpenMM manual. It is also recommended that you install CUDA or OpenCL, since the performance will usually be faster than when running on the CPU platform. PDBFixer requires that NumPy be installed.
To use PDBFixer create a PDBFixer object, passing to its constructor a PdbStructure object containing the structure to process. You then call a series of methods on it to perform various transformations. When all the transformations are done, you can get the new structure from its topology and positions fields. The overall outline of your code will look something like this:
-fixer = PDBFixer(PdbStructure(open('myfile.pdb'))) +fixer = PDBFixer(file=open('myfile.pdb')) # ... # Call various methods on the PDBFixer # ... @@ -213,8 +213,7 @@Examples
from pdbfixer import PDBFixer from simtk.openmm.app import PDBFile -from simtk.openmm.app.internal.pdbstructure import PdbStructure -fixer = PDBFixer(PdbStructure(open('myfile.pdb'))) +fixer = PDBFixer(file=open('myfile.pdb')) fixer.findMissingResidues() fixer.findNonstandardResidues() fixer.replaceNonstandardResidues() @@ -228,7 +227,7 @@Examples
Suppose you want to keep only the first chain in the file and remove all the others. To do this, call removeChains():-fixer = PDBFixer(PdbStructure(open('myfile.pdb'))) +fixer = PDBFixer(file=open('myfile.pdb')) numChains = len(list(fixer.topology.chains())) fixer.removeChains(range(1, numChains)) fixer.findMissingResidues()