From bdb12dd175c34ba5d6c1a7194e253b429c5487c2 Mon Sep 17 00:00:00 2001 From: marco <marco@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Wed, 24 Mar 2010 08:31:41 +0000 Subject: [PATCH] show how to load structures with errors git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1876 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- website/raw/FAQ.mkdown | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/website/raw/FAQ.mkdown b/website/raw/FAQ.mkdown index 7caed4df1..18cdb1afa 100644 --- a/website/raw/FAQ.mkdown +++ b/website/raw/FAQ.mkdown @@ -18,4 +18,11 @@ The python glob module can be used to match files in a certain directory against import glob pdbs=[] for pdb_file in glob.glob(os.path.join(dir_path, '*.pdb')): - pdbs.append(io.LoadPDB(os.path.join(dir_path, pdb_file))) \ No newline at end of file + pdbs.append(io.LoadPDB(os.path.join(dir_path, pdb_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 -- GitLab