| 1 |
# In this example, we define two types of molecules: "H" and "P", |
| 2 |
# both containing two atoms, whose ids (names) are "ca" and "r", |
| 3 |
# and whose atom-types vary. |
| 4 |
# |
| 5 |
# "H" molecules: "P" molecules: |
| 6 |
# ("hydrophobic") ("polar"/"hydrophilic") |
| 7 |
# |
| 8 |
# @HR @PR |
| 9 |
# | | |
| 10 |
# @CA @CA |
| 11 |
# |
| 12 |
# Eventually, we will connect multiple "H" and "P" molecules |
| 13 |
# together to form a polymer, as shown below: |
| 14 |
# |
| 15 |
# @HR @HR |
| 16 |
# | | |
| 17 |
# _@CA_ _@CA_ |
| 18 |
# ... -.@CA-' `-@CA-' ` ... |
| 19 |
# | | |
| 20 |
# @PR @PR |
| 21 |
# |
| 22 |
# The "H" and "P" molecules both share the same type of |
| 23 |
# backbone atom ("CA"), but have their own custom "r" |
| 24 |
# sidechain atoms with different properties: |
| 25 |
# The "HR" atoms belonging to "H" molecules are attracted to each other. |
| 26 |
# The "PR" atoms in "P" molecules are not. |