Skip to main content

An API for ATB

Project description

atb_api

GitHub Actions Build Status codecov

This API is a re-write of the UQ version in Python 2.7

This is a work in progress. It is for Lily's personal use, so not all features of the old API are supported yet. Please open an issue on the Issue tracker if you notice a bug or need a feature.

Example

You will need a valid ATB token to use this API. Please email the ATB administrators to request a token.

Create an instance by passing an API token, or the filename of one:

    api = ATBApi(api_token="MY_TOKEN")

Submit a molecule by passing in a PDB string or filename:

    molid = api.submit_molecule(my_pdb_file.pdb, net_charge=0, molecule_type="heteromolecule")
    assert isinstance(molid, int)

Get a molecule with a molecule ID:

    molecule = api.get_molecule(molid=molid)
    print(molecule.atoms)
    print(molecule.bonds[0].code)

Download a molecule file with a molecule ID:

    pdb_as_str = api.download_molecule(molid=903922, format="pdb",
                                       resolution="all_atom", optimized=True)

Copyright

Copyright (c) 2022, Lily Wang

Acknowledgements

Many thanks to the original ATB API from Bertrand Caron.

Project based on the Computational Molecular Science Python Cookiecutter version 1.6.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atb_api-0.0.1.tar.gz (132.9 kB view details)

Uploaded Source

File details

Details for the file atb_api-0.0.1.tar.gz.

File metadata

  • Download URL: atb_api-0.0.1.tar.gz
  • Upload date:
  • Size: 132.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for atb_api-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a178f016bfa62e9c28abb0dd77af535ded6bffc6189e90de03e45d442b115268
MD5 0667bf5dab547d05d298fc946d94a607
BLAKE2b-256 2f292a6331cbcc902f2834fb98a3c728b0504aec0ae37326c7df207bdd7522dc

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page