File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 4141original_top = Topology (top_dict )
4242
4343# %% [markdown]
44- # # 1. Manipulation of partial charges
44+ # # 1. Manipulation of nonbonded parameters
45+ # ## 1.1 Manipulation of partial charges
4546# Example: Change the charge of the CB atom of the first Ala residue and its attached H atoms
4647# %% [markdown]
4748# Inital charges
6970out_path = Path ("hexala_mod_charges.top" )
7071top .to_path (out_path )
7172# %% [markdown]
73+ # ## 1.2. Manipulation of Lennard-Jones parameters
74+ # Example: Change the Lennard-Jones parameters of the CT atom type.
75+ # %% [markdown]
76+ # Inital LJ parameters:
77+ # %%
78+ top = deepcopy (original_top )
79+ print (top .ff .atomtypes ["CT" ])
80+ # %% [markdown]
81+ # Modify LJ parameters:
82+ # %%
83+ top .ff .atomtypes ["CT" ].sigma = "0.35" # New sigma value in nm
84+ top .ff .atomtypes ["CT" ].epsilon = "0.8" # New epsilon value in kJ mol-1
85+
86+ print (top .ff .atomtypes ["CT" ])
87+ # %% [markdown]
88+ # Now, let's write the modified topology to a new file, called "hexala_mod_lj.top".
89+ # %%
90+ out_path = Path ("hexala_mod_lj.top" )
91+ top .to_path (out_path )
92+ # %% [markdown]
7293# # 2. Manipulation of bonded parameters
7394# ## 2.1. Local parameter modification
7495# Simillar to the partial charges, the force field parameters can be modified of a single bond angle or dihedral. <br>
You can’t perform that action at this time.
0 commit comments