Skip to content

Silence console output #104

Description

@peastman

I am using the ASE interface like this:

atoms = ase.Atoms(positions=pos, numbers=numbers, charges=charges)
atoms.calc = XTB(method="GFN-FF")
ase.optimize.LBFGS(atoms, logfile=os.devnull).run(0.001, 20)

Despite directing the log to devnull, the optimizer still prints about a hundred lines of output every time I do this:

          ==================== Thresholds ====================
          CN  :   150.00000
          rep :   500.00000
          disp:  2500.00000
          HB1 :   250.00000
          HB2 :   450.00000

          Pauling EN used:
          Z : 1  EN :  2.20
          Z : 6  EN :  2.55
          Z : 7  EN :  3.04
          Z : 8  EN :  3.44
          Z :14  EN :  1.90
          electric field strengths (au): 0.000

           ------------------------------------------------- 
          |           Force Field Initialization            |
           ------------------------------------------------- 

and so on. Is there some way I can silence the output? Here are the relevant package versions (installed with conda).

ase                       3.22.1             pyhd8ed1ab_1    conda-forge
xtb                       6.5.1                h03160e7_1    conda-forge
xtb-python                22.1            py310h1fa729e_0    conda-forge

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    unconfirmedThis report has not yet been confirmed by the developers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions