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.
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 (c) 2022, Lily Wang
Many thanks to the original ATB API from Bertrand Caron.
Project based on the Computational Molecular Science Python Cookiecutter version 1.6.