mittinatten / freesasa

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

JSON-C library not detected, #89

Closed genya closed 1 year ago

genya commented 1 year ago

I'm running MacOS Venture 13.0 and installing freesasa after cloning the repository and getting the following error from running ./configure configure: error: Library JSON-C not found, install library or build without (using --disable-json).

but I did install JSON-C using homebrew (https://formulae.brew.sh/formula/json-c)

Any insight why this is?

As suggested, I ran ./configure --disable-json and the rest of the installation seemed to complete successfully.

However when asked to compute accessibility per residue, freesasa still gives chain-level output, and I wonder whether this is due to the missing JSON-C library, since the documentation describes depth as "Depth of JSON and XML output [default: chain]" Here's the example command and output:

% freesasa --depth residue example.pdb

FreeSASA 2.1.2

PARAMETERS algorithm : Lee & Richards probe-radius : 1.400 threads : 2 slices : 20

INPUT source : example.pdb chains : A model : 1 atoms : 1406

RESULTS (A^2) Total : 16674.55 Apolar : 10552.41 Polar : 6122.14 CHAIN A : 16674.55

mittinatten commented 1 year ago

Hi! Not sure why configure can't find the library, it works for me on Ventura with the homebrew package. The --depth option only applies to the json and xml output formats (maybe the docs aren't clear about that). To get residue level output you can use --format=seq or --format=rsa, and for atom level output --format=pdb or --format=cif.

genya commented 1 year ago

Thank you! the --format rsa option produces the ouput I was looking for. This is awesome thank you so much.

mittinatten commented 1 year ago

Glad it worked out :)