Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ligand binding mode clustering with PyEMMA #13

Merged
merged 29 commits into from
Nov 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
576c63d
Add content to README for Python intro.
Oct 26, 2017
df2bdea
Update Lecture 1 slides, add usage info
davidlmobley Nov 1, 2017
69baa72
Update to include openforcefield in getting started
davidlmobley Nov 2, 2017
cb6b7a1
Clustering example with PyEMMA
Nov 2, 2017
8aef68c
Shrink traj file and rename
Nov 2, 2017
f6cb576
Update notebook
Nov 2, 2017
b4f0fbc
Add first pass at setting up yank hydration calculations for one of m…
davidlmobley Nov 3, 2017
b6d6537
Tweaks/debugging.
davidlmobley Nov 7, 2017
ec44999
Merge branch 'lectures' of https://github.com/MobleyLab/drug-computin…
davidlmobley Nov 7, 2017
67bd402
Add draft Jupyter notebooks which I need to go through and check/upda…
davidlmobley Nov 7, 2017
d11be40
Adjust chapter 2 to be current.
davidlmobley Nov 7, 2017
f8df839
Add some prototype materials (needing generalization) for hydration f…
davidlmobley Nov 7, 2017
872b16a
Merge pull request #14 from MobleyLab/chile_tutorial
davidlmobley Nov 7, 2017
7acbf2c
Fix broken link
davidlmobley Nov 7, 2017
fecb537
Update/make current 3rd chapter of intro.
davidlmobley Nov 7, 2017
81690d5
Add primes.py
davidlmobley Nov 8, 2017
cf415fb
Add test.py example
davidlmobley Nov 8, 2017
29029bd
Add Chapter 4.
davidlmobley Nov 8, 2017
892c7f0
Add test.py updated version
davidlmobley Nov 8, 2017
1e03424
Add program.py example
davidlmobley Nov 9, 2017
f233730
Add atom.py and test2.py examples
davidlmobley Nov 9, 2017
5310982
Finish updating Chapter 5.
davidlmobley Nov 9, 2017
39268ca
Finish updating notebooks; add table of contents stuff/organize bette…
davidlmobley Nov 9, 2017
f548aa7
Forgot to save a file last commit.
davidlmobley Nov 9, 2017
126f264
Add various slides for Lecture 1; adjust resolution and styling.
davidlmobley Nov 10, 2017
6775b99
Merge pull request #12 from MobleyLab/lectures
davidlmobley Nov 10, 2017
793ee7b
Update Jupyter notebook for Lecture 1; add HTML version.
davidlmobley Nov 10, 2017
a522f75
Merge branch 'clustering' of github.com:MobleyLab/drug-computing into…
Nov 10, 2017
98fa1fb
Add references and additional comments to code
Nov 10, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion other-materials/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ This contains material that is useful as background or in support of content els
It may be crosslinked from course content, etc.

## Manifest
- `python-intro`: Directory containing introductory material on Python; see `python-intro/README.md`
- `python-intro`: Directory containing introductory material on Python; see [`python-intro/README.md`](python-intro/README.md)
- `solvation-free-energies`: Directory containing example materials for hydration free energy calculations with Yank; see [`solvation-free-energies/README.md`][solvation-free-energies/README.md]
68 changes: 59 additions & 9 deletions other-materials/python-intro/Intro_1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
"source": [
"# A brief, basic introduction to Python for scientific computing - Chapter 1\n",
"\n",
"## Background/prerequisites\n",
"This is part of a brief introduction to Python; please find links to the other chapters and authorship information [here](https://github.com/MobleyLab/drug-computing/blob/master/other-materials/python-intro/README.md) on GitHub. This is the first chapter in this content.\n",
"\n",
"For best results with these notebooks, we recommend using the [Table of Contents nbextension](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions/toc2) which will provide you with a \"Navigate\" menu in the top menu bar which, if dragged out, will allow you to easily jump between sections in these notebooks. To install, in your command prompt, use:\n",
"* `conda install -c conda-forge jupyter_contrib_nbextensions`\n",
"* `jupyter contrib nbextension install --user`\n",
"* Open `jupyter notebook` and click the `nbextensions` button to enable `Table of Contents`. \n",
"(See the [jupyter nbextensions documentation](https://github.com/ipython-contrib/jupyter_contrib_nbextensions) for more information on using these.)\n",
"\n",
"## Introduction/Overview\n",
"\n",
"Python is an extremely usable, high-level programming language that is quickly becoming a standard in scientific computing. It is open source, completely standardized across different platforms (Windows / MacOS / Linux), immensely flexible, and easy to use and learn. Programs written in Python are highly readable and often much shorter than comparable programs written in other languages like C or Fortran. Moreover, Python comes pre-loaded with standard modules that provide a huge array of functions and algorithms, for tasks like parsing text data, manipulating and finding files on disk, reading/writing compressed files, and downloading data from web servers. Python is also capable of all of the complex techniques that advanced programmers expect, like object orientation.\n",
Expand Down Expand Up @@ -77,7 +86,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"Python 3.6.2 |Anaconda custom (x86_64)| (default, Sep 21 2017, 18:29:43)\n",
Expand All @@ -96,7 +107,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
">>> 1"
Expand All @@ -106,6 +119,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### This notebook is its own interpreter\n",
"\n",
"Here, in this Jupyter notebook, each code cell effectively functions as part of an interactive interpreter, so you will see very similar behavior (with some additional bells and whistles) compared to what you would see in the commmand line on your own computer.\n",
"\n",
"As we will show later, Python can also read scripts, or files that are pre-written lists of commands to execute in sequence. With the exception that output after each line is suppressed when reading from a file, there is no difference in the way Python treats commands entered interactively, in Jupyter notebooks, and in scripts; the latter are simply read in as if they were typed at the interactive prompt or in a Jupyter notebook (except that Jupyter notebooks also provide some special commands). This gives us a powerful way to test out commands in your programs by entering them interactively while writing code.\n",
Expand All @@ -116,12 +131,21 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
">>> 1 #I just entered the number 1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Breaking long commands"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -132,7 +156,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
">>> 1.243 + (3.42839 - 4.394834) * 2.1 \\\n",
Expand All @@ -150,7 +176,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
">>> (1.243 + (3.42839 - 4.394834) * 2.1 \n",
Expand Down Expand Up @@ -191,13 +219,17 @@
"source": [
"Avoid using this notation in programs that you write, as it will make your code more dense and less legible.\n",
"\n",
"### Help in Python\n",
"\n",
"There is a generic help function in Python that will tell you about almost everything. For example, it will tell you what the proper arguments for a function are:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
">>> help(sum)"
Expand All @@ -217,7 +249,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
">>> Var = 1\n",
Expand All @@ -227,7 +261,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
">>> Var"
Expand All @@ -236,7 +272,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
">>> var"
Expand All @@ -246,6 +284,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exiting interactive Python\n",
"\n",
"To exit the Python interactive prompt on your computer (not relevant for Jupyter notebooks, as here), we need to use an end-of-file character. Under Windows, this corresponds to the Ctrl-Z key combination; in Linux, it corresponds to Ctrl-D. Alternatively, one can use the exit() function:"
]
},
Expand Down Expand Up @@ -278,6 +318,16 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.2"
},
"toc": {
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"toc_cell": false,
"toc_position": {},
"toc_section_display": "block",
"toc_window_display": false
}
},
"nbformat": 4,
Expand Down
Loading