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

Fix Binder and jupyter notebooks #51

Merged
merged 5 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Procrustes
[![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://opensource.org/licenses/)
[![Build Status](https://travis-ci.com/theochem/procrustes.svg?branch=master)](https://travis-ci.com/theochem/procrustes)
[![Documentation Status](https://readthedocs.org/projects/procrustes/badge/?version=latest)](https://procrustes.readthedocs.io/en/latest/?badge=latest)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/[email protected]:theochem/procrustes.git/master)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/theochem/procrustes/master?filepath=docs%2Fnotebooks%2F)

The Procrustes library provides a set of functions for transforming a matrix to make it
as similar as possible to a target matrix. For more information, visit
Expand Down
4 changes: 2 additions & 2 deletions docs/notebooks/Atom_Atom_Mapping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
],
"source": [
"# the permutation matrix\n",
"res[\"array_u\"]"
"res[\"t\"]"
]
},
{
Expand All @@ -160,7 +160,7 @@
"outputs": [],
"source": [
"# Compute the transformed molecule A\n",
"new_A = np.dot(res[\"array_u\"].T, np.dot(res[\"new_a\"], res[\"array_u\"])).astype(int)"
"new_A = np.dot(res[\"t\"].T, np.dot(res[\"new_a\"], res[\"t\"])).astype(int)"
]
},
{
Expand Down
10 changes: 5 additions & 5 deletions docs/notebooks/Chirality_Check.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -128,7 +128,7 @@
" remove_zero_col=False,\n",
" remove_zero_row=False)\n",
"\n",
"if res[\"e_opt\"]/res_ref[\"e_opt\"] > 10:\n",
"if res[\"error\"]/res_ref[\"error\"] > 10:\n",
" print(\"These two compounds are enantiomers \" \n",
" \"and there is at least one chiral center in each of them.\")\n",
"else:\n",
Expand All @@ -145,7 +145,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -182,7 +182,7 @@
" remove_zero_col=False,\n",
" remove_zero_row=False)\n",
"\n",
" if res[\"e_opt\"] / res_ref[\"e_opt\"] > 10:\n",
" if res[\"error\"] / res_ref[\"error\"] > 10:\n",
" print(\"These two compounds are enantiomers \"\n",
" \"and there is at least one chiral center in each of them.\")\n",
" else:\n",
Expand Down Expand Up @@ -246,7 +246,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/Protein_Structure_Alignment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@
],
"source": [
"# now new_A is the array after rotation\n",
"new_A_transformed = np.dot(res[\"new_a\"], res[\"array_u\"])\n",
"new_A_transformed = np.dot(res[\"new_a\"], res[\"t\"])\n",
"\n",
"rmsd_after = compute_rmsd(new_A_transformed, res[\"new_b\"])\n",
"print(rmsd_after)"
Expand Down
12 changes: 10 additions & 2 deletions docs/notebooks/Ranking_by_Reordering.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
" remove_zero_row=False,\n",
" mode=perm_mode)\n",
" # Compute the rank\n",
" _, rank = np.where(res[\"array_u\"] == 1)\n",
" _, rank = np.where(res[\"t\"] == 1)\n",
" rank += 1\n",
"\n",
" return rank"
Expand All @@ -187,7 +187,15 @@
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Maximum iteration reached! Change=4.783354588670838e-07\n"
]
}
],
"source": [
"# compute the rank\n",
"rank = ranking(D)"
Expand Down