Skip to content
Snippets Groups Projects
Commit bdb12dd1 authored by marco's avatar marco
Browse files

show how to load structures with errors

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1876 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent a87a6fc2
No related branches found
No related tags found
No related merge requests found
...@@ -18,4 +18,11 @@ The python glob module can be used to match files in a certain directory against ...@@ -18,4 +18,11 @@ The python glob module can be used to match files in a certain directory against
import glob import glob
pdbs=[] pdbs=[]
for pdb_file in glob.glob(os.path.join(dir_path, '*.pdb')): for pdb_file in glob.glob(os.path.join(dir_path, '*.pdb')):
pdbs.append(io.LoadPDB(os.path.join(dir_path, pdb_file))) pdbs.append(io.LoadPDB(os.path.join(dir_path, pdb_file)))
\ No newline at end of file
**How do I load a crappy PDB file?**
The easiest way is to use the `fault_tolerant` option of LoadPDB. If you set the value to true, it will load the structure and just skip erroneus records:
::::python
ent=io.LoadPDB('pdb_with_errors.pdb', fault_tolerant=True)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment