mittinatten / freesasa

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

How to prohibit FreeSASA warning #50

Closed xiaolinpan closed 4 years ago

xiaolinpan commented 4 years ago

Could you teach me to prohibit the waring message? thank you very much! """ FreeSASA: warning: guessing that atom 'H' is symbol ' H' FreeSASA: warning: atom 'TRP H' unknown, guessing element is ' H', and radius 1.100 A FreeSASA: warning: guessing that atom 'H' is symbol ' H' FreeSASA: warning: atom 'TRP H' unknown, guessing element is ' H', and radius 1.100 A FreeSASA: warning: guessing that atom 'H' is symbol ' H' FreeSASA: warning: atom 'TRP H' unknown, guessing element is ' H', and radius 1.100 A FreeSASA: warning: guessing that atom 'H' is symbol ' H' FreeSASA: warning: atom 'TRP H' unknown, guessing element is ' H', and radius 1.100 A FreeSASA: warning: guessing that atom 'H' is symbol ' H' FreeSASA: warning: atom 'TRP H' unknown, guessing element is ' H', and radius 1.100 A FreeSASA: warning: guessing that atom 'N' is symbol ' N' FreeSASA: warning: guessing that atom 'C' is symbol ' C' FreeSASA: warning: guessing that atom 'C' is symbol ' C' FreeSASA: warning: guessing that atom 'O' is symbol ' O' FreeSASA: warning: guessing that atom 'C' is symbol ' C' FreeSASA: warning: guessing that atom 'O' is symbol ' O' FreeSASA: warning: guessing that atom 'H' is symbol ' H' """

mittinatten commented 4 years ago

How are you calling freesasa to get this?

On Mon, 24 Aug 2020 at 16:08, xiaolinpan notifications@github.com wrote:

Could you teach me to prohibit the waring message? thank you very much!

"""

FreeSASA: warning: guessing that atom 'H' is symbol ' H'

FreeSASA: warning: atom 'TRP H' unknown, guessing element is ' H', and radius 1.100 A

FreeSASA: warning: guessing that atom 'H' is symbol ' H'

FreeSASA: warning: atom 'TRP H' unknown, guessing element is ' H', and radius 1.100 A

FreeSASA: warning: guessing that atom 'H' is symbol ' H'

FreeSASA: warning: atom 'TRP H' unknown, guessing element is ' H', and radius 1.100 A

FreeSASA: warning: guessing that atom 'H' is symbol ' H'

FreeSASA: warning: atom 'TRP H' unknown, guessing element is ' H', and radius 1.100 A

FreeSASA: warning: guessing that atom 'H' is symbol ' H'

FreeSASA: warning: atom 'TRP H' unknown, guessing element is ' H', and radius 1.100 A

FreeSASA: warning: guessing that atom 'N' is symbol ' N'

FreeSASA: warning: guessing that atom 'C' is symbol ' C'

FreeSASA: warning: guessing that atom 'C' is symbol ' C'

FreeSASA: warning: guessing that atom 'O' is symbol ' O'

FreeSASA: warning: guessing that atom 'C' is symbol ' C'

FreeSASA: warning: guessing that atom 'O' is symbol ' O'

FreeSASA: warning: guessing that atom 'H' is symbol ' H'

"""

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mittinatten/freesasa/issues/50, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVV4HCQJBYSJQLKYI5PSY3SCJX5VANCNFSM4QJRKI2A .

xiaolinpan commented 4 years ago

I use structure.addAtom() to create a freesasa structure, and when i use atom symbol(C, H, O, N, etc) as atom name, it appeared, but the result calculated is right. I want to prohibit the message, could you help me? thank you very much!

mittinatten commented 4 years ago

The Python API does not support all options available yet, in the C API you can suppress these specific warnings. I should probably expose that in Python as well.

You can override all warnings using:

freesasa.setVerbosity(freesasa.nowarnings)

But, you should probably not include H atoms, the standard atomic radii are designed to work without hydrogens.

xiaolinpan commented 4 years ago

The hydrogen atom is added to match the atom index of other programs, thank you for your help!

mittinatten commented 4 years ago

Ok, I have created a task to add the mentioned functionality https://github.com/freesasa/freesasa-python/issues/15