xtb icon indicating copy to clipboard operation
xtb copied to clipboard

Cannot suppress output for a GFN-FF calculation in API

Open NicolaiRee opened this issue 5 years ago • 2 comments

Moved here from xtb-python by @awvwgk

Describe the bug

print_level=0 for a GFN-FF calculation with ASE still prints calculations output, as opposed to print_level=0 for a GFN1-xTB calculation with ASE, where the output is suppressed.

Detailed description

Setup: version = "20.1" API_VERSION = "1.0.0" Python 3.8.3

Command in python script: ase_mol.set_calculator(XTB(method="GFN-FF", max_iterations=250, solvent="", print_level=0)) relax = LBFGS(ase_mol, logfile=None) relax.run(fmax=fmax, steps=max_steps)

Error: Calculation output is not suppressed: Skærmbillede 2020-06-09 kl  15 17 04

Expected behaviour

No output, just like running method="GFN1-xTB" with the same settings.

NicolaiRee avatar Jun 09 '20 13:06 NicolaiRee

The GFN-FF C-API is currently experimental and the implementation has not been checked thoroughly for API usability. There are numerous issues that might interfere with API usage, like file IO for the topology and reading from files in the working directory (like charges). Printing to STDOUT is only a minor annoyance here.

The Python API offers access to the GFN-FF on the same terms as the C-API. Therefore, we better move this issue to the source upstream.

awvwgk avatar Jun 09 '20 13:06 awvwgk

We can use https://github.com/minrk/wurlitzer to mute the output of GFNFF.

pikakolendo02 avatar Jun 28 '23 22:06 pikakolendo02