Closed mittinatten closed 7 years ago
Thanks for looking into this. In the meantime, I wrote a few scripts to get it done, so no rush/worries if you don't have time to look into it now.
I separate the models:
`import re
with open('4nyg.pdb', 'r') as f: data = f.read()
found = re.findall(r'\n(MODEL.?ENDMDL)\n*', data, re.M | re.S)
[open(str(i)+'.pdb', 'w').write(found[i-1]) for i in range(1, len(found)+1)]`
Then I run a bash command:
for i in *.pdb; do freesasa --format=pdb "$i" > $i.out; done
Then I put everything back together:
`import glob
read_files = glob.glob("*.out")
with open("result.txt", "wb") as outfile: for f in read_files: with open(f, "rb") as infile: outfile.write(infile.read())`
Hi again, Turns out the fix only involved a very minor change. 28d7e1d should fix this (in the dev-branch). I'll close the issue, feel free to reopen if the patch doesn't work as expected.
Merged the fix into the master branch too
Only the first model is included in the PDB output when using the CLI option
--separate-models
(see #24).