Skip to content

cheminfo-py/xtbservice

Repository files navigation

xtb-service

This is a webservice built using FastAPI.

Allows to:

  • Simulate IR spectra given a SMILES string
  • Get conformers

Usage

To be usable on Heroku or Dokku, which use PORT environmental variables, you need to either create this environmental variable or put it into an .env file. For local development, the run_docker.sh script uses 8091.

./build_docker # builds the docker image
./run_docker # starts the service

For production, you may want to use Docker compose

docker-compose up

Customization

You have the option to customize the behavior of the app using environment variables:

  • IMAGINARY_FREQ_THRESHOLD: sets the maximum energy in cm-1 for imaginary frequency (if this threshold is exceeded, the output will contain a warning)
  • MAX_ATOMS_XTB/MAX_ATOMS_FF: if the input contains more than this number of atoms, an error is thrown
  • TIMEOUT: If the request takes longer than this time (in seconds) a TimeOut error is raised
  • CACHEDIR: Sets the directory for the diskcache. It will be mounted by the docker container.

Acknowledgments

This webservices heavily relies on xtb and ase. If you find this service useful and mention it in a publication, please also cite ase and xtb:

It also uses RDKit and the conformer search proposed by Riniker/Landrum:

Docs

You find docs on http://127.0.0.1:$PORT/v1/docs.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages