scientific_programming_course

Course material for Scientific Programming with Python given at University of Applied Science Bonn-Rhein-Sieg.

https://github.com/karlkirschner/scientific_programming_course

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.4%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Course material for Scientific Programming with Python given at University of Applied Science Bonn-Rhein-Sieg.

Basic Info
  • Host: GitHub
  • Owner: karlkirschner
  • License: cc-by-sa-4.0
  • Language: Jupyter Notebook
  • Default Branch: master
  • Size: 35.1 MB
Statistics
  • Stars: 12
  • Watchers: 2
  • Forks: 6
  • Open Issues: 0
  • Releases: 0
Created almost 6 years ago · Last pushed 8 months ago
Metadata Files
Readme License Citation

README.md

Scientific Programming with Python

Course material for given at University of Applied Science Bonn-Rhein-Sieg.

This course’s goal is to introduce students to the Python3 programming language with a scientific mindset. Basic programming concepts (e.g. list, dictionaries, conditions, functions) will be covered, with specialized libraries focused upon that are used within the scientific community (e.g. matplotlib, numpy, scipy). Students will also be introduced to Jupyter notebooks, Integrated Development Environments (IDE), and writing unit tests. The basic ideas behind good scholarship (i.e. wissenschaftliche arbeit) will also be discussed.

Python is increasingly one of the most important programming languages that is used (TIOBE ranked #3, IEEE’s Spectrum ranked #1). Due to its ease of use, extensive libraries and readability, researchers from diverse fields have made it their “go-to” programing language. For example, researchers use Python to create customized workflow for simulations; to analyze experiment- and simulation-generated data; and to create professional data plots. The course presents the foundation of Python, with a focus on its scientific application. It will cover the following concepts:

  • Programming basic concepts
  • Jupyter notebooks, Google Colaboratory
  • Python IDE (e.g. PyCharm, Sublime)
  • Creating custom functions and personal libraries
  • Calling and using external libraries
  • Popular scientific community-based libraries (e.g. Statistics, Pandas, Matplotlib, Numpy)
  • Writing command-line programs with input flags
  • Using unit tests to improve code development

Scholarship topics will include: - Workflows, backups, version control - Reproducibility - International Units - Use of constants - Regression, extrapolation, parameter optimization - Keeping It Simple and Smart (K.I.S.S.) - Citations and giving credit

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

CC BY-SA 4.0

Owner

  • Name: Karl Kirschner
  • Login: karlkirschner
  • Kind: user

Citation (citation_lecture.ipynb)

{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# <center>Scientific Programming with Python</center>\n",
    "\n",
    "## <center>Citations</center>\n",
    "\n",
    "### <center>Standing on the shoulders of giants and how to avoiding plagiarism</center>\n",
    "\n",
    "\n",
    "### <center>Karl N. Kirschner<br>Department of Computer Science,<br>University of Applied Sciences Bonn-Rhein-Sieg<br>Sankt Augustin, Germany</center>\n",
    "\n",
    "<hr style=\"border:2px solid gray\"></hr>\n",
    "\n",
    "#### Why spend time doing proper citations?\n",
    "\n",
    "1. Provides **credit** for hard work done\n",
    "\n",
    "2. Enables **reproducibility**\n",
    "\n",
    "3. Enables **fact-checking**\n",
    "\n",
    "4. Demonstrates and builds your **credibility as a scholar**\n",
    "\n",
    "5. Enables you to **avoid plagiarism**\n",
    "\n",
    "6. Establishes the work to be authoritative – being scholarly – **strengthens your arguments/finding**\n",
    "\n",
    "\n",
    "#### When do you need to cite?\n",
    "\n",
    "When you obtain knowledge/information from\n",
    "\n",
    "1. journals, books, theses, etc.\n",
    "2. creditable websites (e.g. Pandas, Numpy)\n",
    "3. private communications (e.g. professor, mentor)\n",
    "\n",
    "This includes when you use\n",
    "\n",
    "1. existing datasets\n",
    "2. other people's code (e.g. libraries, open-source, github)\n",
    "3. direct and indirect quotes\n",
    "4. original figures, plots, tables, etc.\n",
    "    - this can occur when presenting state-of-the-art or in the Results section of your thesis (e.g. \"Figure was obtained from reference 1.\")\n",
    "5. Modified images, plots, tables that are pulled from other sources (e.g. \"The original unmodified figure can be found in reference 1.\")\n",
    "\n",
    "#### Formatting\n",
    "\n",
    "1. Citation styles within the body of the text\n",
    "\n",
    "`Promiscuity underlies the concept of drug repurposing [8-13].`\n",
    "\n",
    "2. Reference/Citation formats in the reference section\n",
    "\n",
    "`1. T.T. Ashburn and K.B. Thor, \"Drug repositioning: identifying and developing new uses for existing drugs.\" Nat. Rev. Drug Discov., 2004, 3, 673-683`\n",
    "\n",
    "\n",
    "#### Possible (and often) Pitfalls\n",
    "1. Not citing the original source\n",
    "2. Propagating errors created by other’s carelessness (e.g. not reading the original source; double checking the author's name, page numbers, volumes, etc.)\n",
    "3. Inconsistent formats (e.g. author initials vs. full given name; abbreviated journal names vs. full journal names)\n",
    "4. Accents on special characters (e.g. ä, ö, ü)\n",
    "\n",
    "\n",
    "#### Additional Information\n",
    "\n",
    "IEEE Citation Style\n",
    "- common for computer scientists and engineers\n",
    "- http://pitt.libguides.com/citationhelp/ieee\n",
    "\n",
    "\n",
    "#### Examples\n",
    "\n",
    "The following two examples will demonstrate\n",
    "1. Why citing knowledge is important by providing an example text with (Example 1) and without (Example 2) citation.\n",
    "2. What type of information should be cited and how the citation is done and how the references are formatted.\n",
    "\n",
    "<hr style=\"border:2px solid gray\"></hr>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## <center>Example 1</center>\n",
    "\n",
    "## <center>Thesis Title</center>\n",
    "## <center>Jane Doe<br>June 1, 2022</center>\n",
    "\n",
    "#### Introduction\n",
    "The goal of this thesis is perform and evaluate a molecular dynamics (MD) simulation of liquid water.  The simulated observable recorded was the liquid's density that describes how molecularly compact a chemical system is (i.e. how close the molecules are to one another). Experimentally, the density for pure water was measured to be 0.995659 $\\text{g}/\\text{cm}^3$ at 30.0 °C.\n",
    "\n",
    "Et cetera ...\n",
    "\n",
    "#### Methodology\n",
    "\n",
    "The MD simulations were performed using the AMBER software package (v. 12). The liquid-phase simulation contained 500 TIP3P water molecules. Constant volume production simulations were ran for 110 ns. Langevin dynamics with a collision frequency (i.e. gamma_ln) of 1.0 ps$^{-1}$ was used for regulating the temperature at 30.0 °C.\n",
    "\n",
    "The resulting data were analyzed using the Python3 programming language. The following libraries were specifically Numpy (v. 1.22) and Pandas (v. 1.4.2) in the data analysis. \n",
    "\n",
    "\n",
    "Et cetera ...\n",
    "\n",
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### Questions\n",
    "\n",
    "1. Why should we trust the information present in the writing?\n",
    "\n",
    "\n",
    "2. Where does the experimental density value come from?\n",
    "\n",
    "\n",
    "3. Who and where was the AMBER software developed?\n",
    "\n",
    "\n",
    "4. What exactly is a TIP3P water molecule?\n",
    "\n",
    "\n",
    "5. Why is the value of 1.0 ps$^{-1}$ good for the collision frequency (a parameter that is set in the modelling)?\n",
    "\n",
    "\n",
    "6. Who develped Python?\n",
    "\n",
    "\n",
    "7. For the Python libraries, where can one \n",
    "    - download their code,\n",
    "    - learn about what functions are available,\n",
    "    - learn about how to use those functions,\n",
    "    - learn about how equations are emplemented, and\n",
    "    - learn about any of the hidden parameters settings?\n",
    "\n",
    "<hr style=\"border:2px solid gray\"></hr>\n",
    "<br><br><br><br><br><br><br><br><br><br>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## <center>Example 2</center>\n",
    "\n",
    "\n",
    "## <center>Thesis Title</center>\n",
    "## <center>Jane Doe<br>June 1, 2022</center>\n",
    "\n",
    "#### Introduction\n",
    "The goal of this thesis is perform and evaluate a molecular dynamics (MD) simulation of liquid water.  The simulated observable recorded was the liquid's density that describes how molecularly compact a chemical system is (i.e. how close the molecules are to one another). Experimentally, the density for pure water was measured to be 0.995659 $\\text{g}/\\text{cm}^3$ at 30.0 °C [1].\n",
    "\n",
    "Et cetera ...\n",
    "\n",
    "#### Methodology\n",
    "\n",
    "The MD simulations were performed using the AMBER software package [2, 3] (v. 12). The liquid-phase simulation contained 500 TIP3P [4, 5] water molecules. Constant volume production simulations were ran for 110 ns. Langevin dynamics [6] with a collision frequency (i.e. gamma_ln) of 1.0 ps$^{-1}$ [7] was used for regulating the temperature at 30.0 °C.\n",
    "\n",
    "The resulting data were analyzed using the Python3 [8, 9] programming language. The following libraries were specifically Numpy [10, 11] (v. 1.22) and Pandas [12, 13] (v. 1.4.2) in the data analysis. \n",
    "\n",
    "\n",
    "Et cetera ...\n",
    "\n",
    "<br>\n",
    "\n",
    "#### References\n",
    "\n",
    "[1] M. Vedamuthu, S. Singh, and G.W. Robinson, \"Properties of liquid water: origin of the density anomalies.\" J. Phys. Chem., 1994, 98, 2222-2230.\n",
    "\n",
    "[2] D.A. Case, H.M. Aktulga, K. Belfon, I.Y. Ben-Shalom, J.T. Berryman, S.R. Brozell, D.S. Cerutti, T.E. Cheatham, III, G.A. Cisneros, V.W.D. Cruzeiro, T.A. Darden, R.E. Duke, G. Giambasu, M.K. Gilson, H. Gohlke, A.W. Goetz, R. Harris, S. Izadi, S.A. Izmailov, K. Kasavajhala, M.C. Kaymak, E. King, A. Kovalenko, T. Kurtzman, T.S. Lee, S. LeGrand, P. Li, C. Lin, J. Liu, T. Luchko, R. Luo, M. Machado, V. Man, M. Manathunga, K.M. Merz, Y. Miao, O. Mikhailovskii, G. Monard, H. Nguyen, K.A. O'Hearn, A. Onufriev, F. Pan, S. Pantano, R. Qi, A. Rahnamoun, D.R. Roe, A. Roitberg, C. Sagui, S. Schott-Verdugo, A. Shajan, J. Shen, C.L. Simmerling, N.R. Skrynnikov, J. Smith, J. Swails, R.C. Walker, J Wang, J. Wang, H. Wei, R.M. Wolf, X. Wu, Y. Xiong, Y. Xue, D.M. York, S. Zhao, and P.A. Kollman (2022), Amber 2022, University of California, San Francisco. (https://ambermd.org/index.php)\n",
    "\n",
    "[3] R. Salomon-Ferrer, D.A. Case, R.C. Walker, \"An overview of the Amber biomolecular simulation package.\" WIREs Comput. Mol. Sci., 2013, 3, 198-210. \n",
    "\n",
    "[4] W.L. Jorgensen, J. Chandrasekhar, J.D. Madura, R.W. Impey, and M.L. Klein, \"Comparison of simple potential functions for simulating liquid water.\" J. Chem. Phys., 1983, 79, 926-935.\n",
    "\n",
    "[5] P. Mark and L. Nilsson, \"Structure and Dynamics of the TIP3P, SPC, and SPC/E Water Models at 298 K.\" J. Phys. Chem. A, 2001, 105, 9954-9960. \n",
    "\n",
    "[6] R.W. Pastor, B.R. Brooks, and A. Szabo, \"An Analysis of the Accuracy of Langevin and Molecular Dynamics Algorithms.\" Mol. Phys., 1988, 65, 1409-1419.\n",
    "\n",
    "[7] R. Anandakrishnan, A. Drozdetski, R.C. Walker, and A.V. Onufriev, \"Speed of Conformational Change: Comparing Explicit and Implicit Solvent Molecular Dynamics Simulations.\" Biophys. J., 2015, 108, 1153–1164.\n",
    "\n",
    "[8] Python Software Foundation. Python Language Reference, version 3.8. visited on April 30, 2022 (http://www.python.org).\n",
    "\n",
    "[9] van Rossum, G. Python tutorial, Technical Report CS-R9526, Centrum voor Wiskunde en Informatica (CWI), Amsterdam, 1995.\n",
    "\n",
    "[10] C.R. Harris, K.J. Millman, S.J. van der Walt, et al. \"Array programming with NumPy.\" Nature, 2020, 585, 357-362\n",
    "\n",
    "[11] Numpy User Guide, https://numpy.org/doc/stable/user/index.html, visited on April 29, 2022.\n",
    "\n",
    "[12] The Pandas Development Team pandas-dev/pandas: Pandas Zenodo, 2020 (https://pandas.pydata.org).\n",
    "\n",
    "[13] Pandas User Guide, https://pandas.pydata.org/docs/user_guide/index.html#user-guide, visited on April 30, 2022.\n",
    "\n",
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### Comments\n",
    "\n",
    "1. Example 2 is more professionally done and is considered to be more academic than Example 1.\n",
    "\n",
    "\n",
    "2. Due to the citations and properly formatted references section that includes all of the pertinent information, one can validate the information given in the writing (e.g. the density of water at 30.0  °C).\n",
    "\n",
    "\n",
    "3. Consequently, the writing becomes more substantial and trustworthy since its information content isn’t just coming from the author, but also from several checkable sources."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}

GitHub Events

Total
  • Push event: 51
  • Fork event: 1
Last Year
  • Push event: 51
  • Fork event: 1