diff --git a/_config.yml b/_config.yml
index d6ce4e5..88ba749 100644
--- a/_config.yml
+++ b/_config.yml
@@ -7,7 +7,7 @@
# dc: Data Carpentry
# lc: Library Carpentry
# cp: Carpentries (to use for instructor traning for instance)
-carpentry: "swc"
+carpentry: "molssi"
# Overall title for pages.
title: "Python Scripting for Computational Molecular Science"
diff --git a/_episodes/07-command_line.md b/_episodes/07-command_line.md
index 2d95875..f605969 100644
--- a/_episodes/07-command_line.md
+++ b/_episodes/07-command_line.md
@@ -3,7 +3,8 @@ title: "Running code from the Linux Command Line"
teaching: 15
exercises: 10
questions:
-- "How do I move my code from the interactive jupyter notebook to run from the Linux command line?"
+- "How do I move my code from the interactive Jupyter notebook to run from the Linux command line?"
+- "How do I make Python scripts with help messages and user inputs using argparse?"
objectives:
- "Make code executable from the Linux command line."
- "Use argparse to accept user inputs."
diff --git a/_episodes/07-command_line_sys.md b/_episodes/07-command_line_sys.md
new file mode 100644
index 0000000..c91d9bb
--- /dev/null
+++ b/_episodes/07-command_line_sys.md
@@ -0,0 +1,171 @@
+---
+title: "Running code from the Linux Command Line"
+teaching: 15
+exercises: 10
+alternate: true
+questions:
+- "How do I move my code from the interactive Jupyter notebook to run from the Linux command line?"
+- "How do I make simple Python scripts with user inputs using sys.argv?"
+objectives:
+- "Make code executable from the Linux command line."
+- "Use sys.argv() to accept user inputs."
+keypoints:
+- "You must `import sys` in your code to accept user arguments."
+- "The name of the script itself is always `sys.argv[0]` so the first user input is normally `sys.argv[1]`."
+---
+## Creating and running a python input file
+
+We are now going to move our geometry analysis code out of the Jupyter notebook and into a format that can be run from the Linux command line. Open your favorite text editor and create a new file called "geom_analysis.py" (or choose another filename, just make sure the extension is .py). Paste in your geometry analysis code (the version with your functions) from your jupyter notebook and save your file.
+
+The best practice is to put all your functions at the top of the file, right after your import statements. Your file will look something like this.
+```
+import numpy
+import os
+
+def calculate_distance(atom1_coord, atom2_coord):
+ x_distance = atom1_coord[0] - atom2_coord[0]
+ y_distance = atom1_coord[1] - atom2_coord[1]
+ z_distance = atom1_coord[2] - atom2_coord[2]
+ bond_length_12 = numpy.sqrt(x_distance**2+y_distance**2+z_distance**2)
+ return bond_length_12
+
+def bond_check(atom_distance, minimum_length=0, maximum_length=1.5):
+ if atom_distance > minimum_length and atom_distance <= maximum_length:
+ return True
+ else:
+ return False
+
+def open_xyz(filename):
+ xyz_file = numpy.genfromtxt(fname=filename, skip_header=2, dtype='unicode')
+ symbols = xyz_file[:,0]
+ coord = (xyz_file[:,1:])
+ coord = coord.astype(numpy.float)
+ return symbols, coord
+
+file_location = os.path.join('data', 'water.xyz')
+symbols, coord = open_xyz(file_location)
+num_atoms = len(symbols)
+for num1 in range(0,num_atoms):
+ for num2 in range(0,num_atoms):
+ if num1 The Carpentries comprises
- Software Carpentry, Data Carpentry, and Library Carpentry communities of Instructors, Trainers,
- Maintainers, helpers, and supporters who share a mission to teach
- foundational coding and data science skills to researchers and people
- working in library- and information-related roles. In January,
- 2018, The Carpentries was formed by the merger of Software Carpentry and
- Data Carpentry. Library Carpentry became an official Carpentries Lesson Program in November 2018. While individual lessons and workshops continue to be run under each
- lesson project, The Carpentries provide overall staffing and governance, as
- well as support for assessment, instructor training and mentoring.
- Memberships are joint, and the Carpentries project maintains a shared Code
- of Conduct. The Carpentries is a fiscally sponsored project of Community
- Initiatives, a registered 501(c)3 non-profit based in California, USA. Since 1998, Software Carpentry has
- been teaching researchers across all disciplines the foundational coding
- skills they need to get more done in less time and with less pain. Its
- volunteer instructors have run hundreds of events for thousands of learners
- around the world. Now that all research involves some degree of
- computational work, whether with big data, cloud computing, or simple task
- automation, these skills are needed more than ever. Data Carpentry develops and teaches
- workshops on the fundamental data skills needed to conduct research. Its
- target audience is researchers who have little to no prior computational
- experience, and its lessons are domain specific, building on learners'
- existing knowledge to enable them to quickly apply skills learned to their
- own research. Data Carpentry workshops take researchers through the entire
- data life cycle. Library Carpentry develops lessons and
- teaches workshops for and with people working in library- and
- information-related roles. Its goal is to create an on-ramp to empower this
- community to use software and data in their own work, as well as be
- advocates for and train others in efficient, effective and reproducible data
- and software practices. Education of students, post-docs, and faculty on programming and Best Practices in Software Development is a large part of MolSSI's mission.
+ Our education program consists of our cohorts of Software Fellows,
+ online training materials,
+ and multiple workshops online or in-person at various locations each year.
+ MolSSI’s education techniques and practices are modeled after The Software Carpentries
+ style to teaching novice software best practices. This approach teaches subjects that not only increase a student’s scientific
+ capability and efficiency, but also his/her future marketability in both scientific and non-scientific fields.
+
-{% include carpentries.html %}
+{% include molssi.html %}
{% include links.md %}
diff --git a/_includes/carpentries.html b/_includes/carpentries.html
deleted file mode 100644
index c032bd5..0000000
--- a/_includes/carpentries.html
+++ /dev/null
@@ -1,70 +0,0 @@
-{% comment %}
- General description of Software, Data, and Library Carpentry.
-{% endcomment %}
-
-{% include base_path.html %}
-
-
-
-Schedule
{% if multiday %}
{% for episode in site.episodes %}
- {% if episode.start %} {% comment %} Starting a new day? {% endcomment %}
- {% assign day = day | plus: 1 %}
- {% if day > 1 %} {% comment %} If about to start day 2 or later, show finishing time for previous day {% endcomment %}
- {% assign hours = current | divided_by: 60 %}
- {% assign minutes = current | modulo: 60 %}
- {% endif %}
- Setup
+ Setup
Download files required for the lesson
- {% if multiday %}
+ {% if episode.legacy == None %}
+ {% if episode.start %} {% comment %} Starting a new day? {% endcomment %}
+ {% assign day = day | plus: 1 %}
+ {% if day > 1 %} {% comment %} If about to start day 2 or later, show finishing time for previous day {% endcomment %}
+ {% assign hours = current | divided_by: 60 %}
+ {% assign minutes = current | modulo: 60 %}
+ {% endif %}
- {% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}
- Finish
-
-
+ {% if multiday %}
+ {% endif %}
+ {% assign current = site.start_time %} {% comment %}Re-set start time of this episode to general daily start time {% endcomment %}
{% endif %}
- {% assign current = site.start_time %} {% comment %}Re-set start time of this episode to general daily start time {% endcomment %}
- {% endif %}
- {% assign hours = current | divided_by: 60 %}
- {% assign minutes = current | modulo: 60 %}
- {% endif %}
+ {% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}
+ Finish
+
+
- {% if multiday %} {% if episode.start %}Day {{ day }}{% endif %} {% endif %}
- {% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}
-
- {% assign lesson_number = lesson_number | plus: 1 %}
- {{ lesson_number }}. {{ episode.title }}
-
-
- {% if episode.break %}
- Break
- {% else %}
- {% if episode.questions %}
- {% for question in episode.questions %}
- {{question|markdownify|strip_html}}
- {% unless forloop.last %}
-
- {% endunless %}
- {% endfor %}
+ {% assign hours = current | divided_by: 60 %}
+ {% assign minutes = current | modulo: 60 %}
+
+ {% if multiday %}
- {% assign current = current | plus: episode.teaching | plus: episode.exercises | plus: episode.break %}
+
+
+ {% assign current = current | plus: episode.teaching | plus: episode.exercises | plus: episode.break %}
+ {% endif %}
{% endfor %}
{% assign hours = current | divided_by: 60 %}
{% assign minutes = current | modulo: 60 %}
@@ -77,4 +77,59 @@ {% if episode.start %}Day {{ day }}{% endif %} {% endif %}
+ {% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}
+
+ {% assign lesson_number = lesson_number | plus: 1 %}
+ {{ lesson_number }}. {{ episode.title }}
+
+
+ {% if episode.break %}
+ Break
+ {% else %}
+ {% if episode.questions %}
+ {% for question in episode.questions %}
+ {{question|markdownify|strip_html}}
+ {% unless forloop.last %}
+
-
+ {% endunless %}
+ {% endfor %}
+ {% endif %}
{% endif %}
- {% endif %}
- Schedule
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
+ Alternate lessons are shown below. +
+ +{% endif %} + | {% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }} | +Finish | ++ |
{% if episode.start %}Day {{ day }}{% endif %} | {% endif %} ++ | + {% assign lesson_number = lesson_number | plus: 1 %} + {{ episode.title }} + | +
+ {% if episode.break %}
+ Break
+ {% else %}
+ {% if episode.questions %}
+ {% for question in episode.questions %}
+ {{question|markdownify|strip_html}}
+ {% unless forloop.last %}
+ + {% endunless %} + {% endfor %} + {% endif %} + {% endif %} + |
+