You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/basic/basic.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
fromgmx_top4py.topology.topologyimportTopology
5
5
# %% [markdown]
6
6
# # 1. Reading a topology file
7
-
# Let's read the GROMACS topology file 'urea.top' into a 'Topology' object.
7
+
# Let's read the GROMACS topology file 'urea.top' into a `Topology` object.
8
8
# %%
9
9
top_path=Path("urea.top") # path to the topology file
10
10
top=Topology.from_path(top_path) # read the topology file into a Topology object
@@ -22,7 +22,7 @@
22
22
# In case of the 'urea.top' example, there are one urea molecule and 1000 solvent molecules.
23
23
# The second paragraph of the printout provides an overview of the topology properties of the selected molecule type. <br>
24
24
25
-
#<br>
25
+
#<br>
26
26
# With Moleculetype Urea(1x) with: <br>
27
27
# 8 atoms, <br>
28
28
# 7 bonds, <br>
@@ -49,7 +49,7 @@
49
49
# 125 residuetypes <br>
50
50
# <br>
51
51
52
-
# In the 'urea.top' file, amber99 force field is used.
52
+
# In the 'urea.top' file, the amber99 force field is used.
53
53
# %% [markdown]
54
54
# ## 1.1. The Topology object
55
55
# An instance of the `Topology` class has the following main attributes:
@@ -58,9 +58,9 @@
58
58
# %% [markdown]
59
59
# ### 1.1.1. The moleculetypes attribute
60
60
# The `moleculetypes` attribute is a dictionary where the keys are the names of the molecule types and the values are instances of the `MoleculeType` class.
61
-
# %%
62
-
# In the case of the 'urea.top' example, there are two molecule types: 'SOL' and 'Urea(1x)':
63
61
# %% [markdown]
62
+
# In the case of the 'urea.top' example, there are two molecule types: 'SOL' and 'Urea(1x)':
63
+
# %%
64
64
print(top.moleculetypes)
65
65
# %% [markdown]
66
66
# For example, we can access the topology information of the 'Urea(1x)' molecule type as follows:
0 commit comments