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

Add "Protein Builder" to "Additional Tools" #2453

Merged
merged 2 commits into from
Feb 4, 2014
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions docs/en_us/course_authors/source/additional_tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Individual course teams frequently create tools and problem types that don't hav
Below, you'll find the information you need to create the following tools.

* :ref:`Multiple Choice and Numerical Input`
* :ref:`Protein Builder`

.. _Multiple Choice and Numerical Input:

Expand Down Expand Up @@ -61,3 +62,70 @@ Multiple Choice and Numerical Input Problem Code
</choicetextresponse>
</problem>

.. _Protein Builder:

************************
Protein Builder
************************

The protein builder asks students to create specified protein shapes by stringing together amino acids. In the example below, the goal protein shape is a simple line.


.. image:: /Images/ProteinBuilder.gif
:alt: Image of the protein builder

.. _Create the Protein Builder:

==========================
Create the Protein Builder
==========================

To create the protein builder:

#. Upload all of the files listed above to the *Files & Uploads* page in your course.
#. Under the HTML component, click **Problem** under **Add New Component**, and then click **Blank Advanced Problem**.
#. In the component that appears, click **Edit**.
#. In the component editor, paste the Problem component code from below.
#. Make any changes that you want, and then click **Save**.

.. _Protein Builder Code:

=====================
Protein Builder Code
=====================

::

<problem>
<p>The protein builder allows you string together the building blocks of proteins, amino acids, and see how that string will form into a structure. You are presented with a goal protein shape, and your task is to try to re-create it. In the example below, the shape that you are asked to form is a simple line.</p>

<script type="loncapa/python">

def two_d_grader(expect,ans):
import json
ans=json.loads(ans)
if "ERROR" in ans["protex_answer"]:
raise ValueError("Protex did not understand your answer... try folding the protein")
return ans["protex_answer"]=="CORRECT"


</script>
<text>
<customresponse cfn="two_d_grader">
<designprotein2dinput width="855" height="500" target_shape="W;W;W;W;W;W;W"/>
</customresponse>
</text>
<p>Be sure to click "Fold" to fold your protein before you click "Check".</p>
<solution>
<p>
There are many protein sequences that will fold to the shape we asked you
about. Here is a sample sequence that will work. You can play around with
it if you are curious.
</p>
<ul>
<li>
Stick: RRRRRRR
</li>
</ul>
</solution>
</problem>
2 changes: 2 additions & 0 deletions docs/en_us/course_authors/source/change_log.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Change Log

* - Date
- Change
* - 02/04/14
- Added :ref:`Additional Tools` topic with :ref:`Multiple Choice and Numerical Input` and :ref:`Protein Builder`
* - 01/29/2014
- Added the chapter :ref:`Using an Instant Hangout in Your Course`.
* - 01/21/2014
Expand Down