martimunicoy / peleffy

The peleffy (PELE Force Field Yielder) is a Python package that builds PELE-compatible force field templates.

Home Page:https://martimunicoy.github.io/peleffy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create new molecule silently

cescgina opened this issue · comments

I think it would be a good idea to add a flag to the molecule creation to do so silently. When I am parsing the output of the BCE server I need to create multiple molecules for the clusters (~10-20) which creates a wall of text from the repetition of the few logged lines per molecule. This is not really a big problem, since I can easily redirect the output, but I think it could be nice to have the option to suppress the output for some molecules and leave it only for the molecule that is parameterized.

Although it is not explicitly documented anywhere, there is already an option to configurate peleffy's logger with:

from peleffy.utils import Logger
logger = Logger()
logger.set_level('WARNING')

This should deactivate the annoying messages that are shown every time you initialize a molecule.

But that will reduce all logging right?

This effects all logging messages from peleffy but not from other dependencies such as OpenForceField or RDKit since peleffy works with its own private logger.

Okay, now I see your point in having output information just for a few molecules only. You could change logger's level when working with BCE server's clusters and then change it again just before running the parameterization to display only the messages in this last case.

Ok if I change the logger level I can reduce considerably the amount of output. Thank you!