mittinatten / freesasa

C-library for calculating Solvent Accessible Surface Areas
http://freesasa.github.io/
MIT License
105 stars 37 forks source link

About using '--chain-groups' in the command line. #43

Closed YoochanMyung closed 5 years ago

YoochanMyung commented 5 years ago

Hi everyone,

I am trying to measure SASA or RSA only for specific chains in a single PDB. For example, I cleaned up my 1BJ1 (PDB) and left four chains [L, H, V, W]. What I want is.. grouping them into two -- LH, VW -- to get results of each group.

My first trial would be keeping only chains that I was interested in (L, H). So, there were no other chains (V, W) to be considered and I got results as follows: ======[1]====== PARAMETERS algorithm : Lee & Richards probe-radius : 1.400 threads : 2 slices : 20

INPUT source : 1bj1_ab_cleaned.pdb chains : LH model : 1 atoms : 3307

RESULTS (A^2) Total : 19564.88 Apolar : 10508.09 Polar : 9056.78 CHAIN L : 9472.25 CHAIN H : 10092.63 ======[1]======

Another way would be using the '--chain-groups' in the whole structure and got following results. =========[2]============== PARAMETERS algorithm : Lee & Richards probe-radius : 1.400 threads : 2 slices : 20

INPUT source : 1bj1_cleaned.pdb chains : LH model : 1 atoms : 3307

RESULTS (A^2) Total : 19626.21 Apolar : 10092.54 Polar : 9533.66 CHAIN L : 9501.17 CHAIN H : 10125.03 =========/[1]=============

As you can see, results from the two approaches are quite different. Do you guys have any ideas about this situation? (I am using FreeSASA 2.0.3 in the command line)

Cheers, YooChan

mittinatten commented 5 years ago

Hi, I am not able to reproduce your error, maybe you did something wrong when creating the stripped files?

I created two files using grep (kind of crude, but works)

grep " [LHVW] " 1bj1.pdb > 1bj1_LHVW.pdb
grep " [LH] " 1bj1.pdb > 1bj1_LH.pdb

For me the total for the LH variant is identical to the chain-group LH for the original pdb and the LHVW variant (19626.21 Ångstrom^2).

YoochanMyung commented 5 years ago

Thank's for looking through the problem.

I missed to mention that I was using "--radii=naccess" and I also checked my pdb files are correct. One thing I found was this problem is coming from when I use two options, '--chain-groups' and '--radii=naccess' at the same time.

Here, I put two results (with and without '-radii=naccess' option). The result of 'LHVW' between two runs are different which is right, but the results of individual groups are the same. So, the '--radii' option is not working on individual groups in this case.

$freesasa 1bj1_cleaned.pdb --chain-groups LH+VW --radii=naccess chains : LHVW Total : 28692.84 chains : LH Total : 19626.21 chains : VW Total : 10889.15

$freesasa 1bj1_cleaned.pdb --chain-groups LH+VW chains : LHVW Total : 28770.35 chains : LH Total : 19626.21 chains : VW Total : 10889.15

mittinatten commented 5 years ago

Ok, that looks like a bug. I will look into it over the weekend.

mittinatten commented 5 years ago

Alright, there was a mistake in how the structures in chain groups were initialized. I have fixed it now with the latest commit. Thank you very much for reporting!