O'Reilly logo

Practical Data Science Cookbook by Abhijit Dasgupta, Benjamin Bengfort, Sean Patrick Murphy, Tony Ojeda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading through the code

The Python code to be optimized calculates the Accessible Surface Area (ASA) of a molecule. The ASA quantifies the surface area of a molecule that is open or available to a solvent and has many uses in biology and biochemistry. For the purposes of this recipe, a deeper background into the ASA is unnecessary. However, for those curious, I highly recommend that you read Bosco K. Ho's excellent post about both this code and the ASA. He is the author of the original code that was written for clarity and accuracy but not speed.

For the purpose of optimization, this code was going to be integrated into a web application that would compute the ASA for a molecule upon an upload by the user. As all calculations were computed synchronously, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required