Skip to content
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
46 changes: 26 additions & 20 deletions doc/source/examples/AMSPlumedMD/ams_plumed.ipynb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ Calculation settings
# s.input.MLPotential.Model = 'M3GNet-UP-2022' # if you have ML potential license and M3Gnet installed
# s.input.dftb # if you have a DFTB license

# setting the random seed to ensure reproducibility. You should generally not include this
s.input.ams.RNGSeed = 12345

# MD settings
s.input.ams.Task = "MolecularDynamics"
s.input.ams.MolecularDynamics.NSteps = nsteps
Expand Down Expand Up @@ -158,6 +161,8 @@ Calculation settings
End
End

RNGSeed 12345

Restraints
Distance 1 2 1.2661886450379047 1.0
End
Expand Down Expand Up @@ -188,10 +193,10 @@ Run the job

::

[12.01|16:08:19] JOB dissociating-carbonic-acid STARTED
[12.01|16:08:19] JOB dissociating-carbonic-acid RUNNING
[12.01|16:08:20] JOB dissociating-carbonic-acid FINISHED
[12.01|16:08:21] JOB dissociating-carbonic-acid SUCCESSFUL
[11.03|13:47:36] JOB dissociating-carbonic-acid STARTED
[11.03|13:47:36] JOB dissociating-carbonic-acid RUNNING
[11.03|13:47:37] JOB dissociating-carbonic-acid FINISHED
[11.03|13:47:37] JOB dissociating-carbonic-acid SUCCESSFUL

Analyze the trajectory
~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -222,6 +227,7 @@ Extract the O3H6 distances at each stored frame, and plot some of the molecules
view(mol, ax=axes[i_ax]) # mol is a PLAMS Molecule
axes[i_ax].set_title(f"frame {i}")
i_ax += 1
plt.show()

.. figure:: ams_plumed_files/ams_plumed_11_0.png

Expand Down Expand Up @@ -277,10 +283,10 @@ PLAMS makes it easy to extract any frame from an MD trajectory. As an example, l

::

[12.01|16:08:27] JOB ts-search STARTED
[12.01|16:08:27] JOB ts-search RUNNING
[12.01|16:09:07] JOB ts-search FINISHED
[12.01|16:09:07] JOB ts-search SUCCESSFUL
[11.03|13:47:44] JOB ts-search STARTED
[11.03|13:47:44] JOB ts-search RUNNING
[11.03|13:48:11] JOB ts-search FINISHED
[11.03|13:48:11] JOB ts-search SUCCESSFUL

.. code:: ipython3

Expand All @@ -303,15 +309,15 @@ PLAMS makes it easy to extract any frame from an MD trajectory. As an example, l
::

Frequencies (at a TS there should be 1 imaginary [given as negative])
-1427.002 cm^-1
307.787 cm^-1
364.254 cm^-1
545.556 cm^-1
703.642 cm^-1
744.026 cm^-1
876.638 cm^-1
1080.218 cm^-1
1117.900 cm^-1
1760.451 cm^-1
2064.254 cm^-1
3475.147 cm^-1
-1431.372 cm^-1
321.023 cm^-1
367.843 cm^-1
544.548 cm^-1
703.407 cm^-1
742.540 cm^-1
877.320 cm^-1
1080.540 cm^-1
1124.406 cm^-1
1758.547 cm^-1
2063.143 cm^-1
3472.487 cm^-1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 22 additions & 16 deletions doc/source/examples/COSMORSConformers/cosmors_conformers.ipynb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ Initial imports
Set up conformer generator
~~~~~~~~~~~~~~~~~~~~~~~~~~

First, we input the acetic acid molecule with the ``from_smiles`` function
First, we input the acetic acid molecule with the ``from_smiles`` function and provide the optional compound information that can be written to the COSKF file.

.. code:: ipython3

mol = from_smiles("CC(=O)O")
mol_info = {
"CAS": "64-19-7",
"IUPAC": "Acetic acid",
"Other Name": "Ethanoic acid; Ethylic acid",
}

Now, we’ll specify a conformer generator (identical to the default) that generates only 50 initial structures:

Expand Down Expand Up @@ -74,27 +79,28 @@ Finally, we give this information to the ``ADFCOSMORSConfJob`` class. We also sp
final_filter=fil3,
coskf_name="acetic_acid",
coskf_dir="test_coskfs",
mol_info=mol_info,
)
job.run()
job.results.wait()

::

[19.03|15:33:37] JOB plamsjob STARTED
[19.03|15:33:37] Waiting for job plamsjob to finish
[19.03|15:33:37] JOB plamsjob/conformers_uff STARTED
[19.03|15:33:37] JOB plamsjob/additional_1 STARTED
[19.03|15:33:37] JOB plamsjob/adf_conformers STARTED
[19.03|15:33:37] JOB plamsjob/adf_filter STARTED
[19.03|15:33:37] Waiting for job conformers_uff to finish
[19.03|15:33:37] Waiting for job adf_filter to finish
[19.03|15:33:37] Waiting for job additional_1 to finish
[19.03|15:33:37] Waiting for job adf_conformers to finish
[19.03|15:33:44] JOB plamsjob/conformers_uff SUCCESSFUL
[19.03|15:33:45] JOB plamsjob/additional_1 SUCCESSFUL
[19.03|15:43:18] JOB plamsjob/adf_conformers SUCCESSFUL
[19.03|15:43:19] JOB plamsjob/adf_filter SUCCESSFUL
[19.03|15:43:19] JOB plamsjob/replay STARTED
[11.03|14:09:35] JOB plamsjob STARTED
[11.03|14:09:35] Waiting for job plamsjob to finish
[11.03|14:09:35] JOB plamsjob/conformers_uff STARTED
[11.03|14:09:35] JOB plamsjob/additional_1 STARTED
[11.03|14:09:35] JOB plamsjob/adf_conformers STARTED
[11.03|14:09:35] JOB plamsjob/adf_filter STARTED
[11.03|14:09:35] Waiting for job adf_filter to finish
[11.03|14:09:35] Waiting for job conformers_uff to finish
[11.03|14:09:35] Waiting for job additional_1 to finish
[11.03|14:09:35] Waiting for job adf_conformers to finish
[11.03|14:09:42] JOB plamsjob/conformers_uff SUCCESSFUL
[11.03|14:09:44] JOB plamsjob/additional_1 SUCCESSFUL
[11.03|14:20:21] JOB plamsjob/adf_conformers SUCCESSFUL
[11.03|14:20:22] JOB plamsjob/adf_filter SUCCESSFUL
[11.03|14:20:22] JOB plamsjob/replay STARTED
... (PLAMS log lines truncated) ...

.. code:: ipython3
Expand Down
58 changes: 32 additions & 26 deletions examples/AMSPlumedMD/ams_plumed.ipynb

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions examples/AMSPlumedMD/ams_plumed.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def get_molecule():
# s.input.MLPotential.Model = 'M3GNet-UP-2022' # if you have ML potential license and M3Gnet installed
# s.input.dftb # if you have a DFTB license

# setting the random seed to ensure reproducibility. You should generally not include this
s.input.ams.RNGSeed = 12345

# MD settings
s.input.ams.Task = "MolecularDynamics"
s.input.ams.MolecularDynamics.NSteps = nsteps
Expand Down Expand Up @@ -140,6 +143,7 @@ def get_molecule():
view(mol, ax=axes[i_ax]) # mol is a PLAMS Molecule
axes[i_ax].set_title(f"frame {i}")
i_ax += 1
plt.show()


# The above pictures show how the H(6) approaches the O(3). At the end, the carbonic acid molecule has dissociated into CO2 and H2O.
Expand Down
56 changes: 35 additions & 21 deletions examples/COSMORSConformers/cosmors_conformers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"id": "47bc1ee7-def3-43f2-8cf9-9a89f99988d6",
"metadata": {},
"source": [
"First, we input the acetic acid molecule with the `from_smiles` function"
"First, we input the acetic acid molecule with the `from_smiles` function and provide the optional compound information that can be written to the COSKF file."
]
},
{
Expand All @@ -67,7 +67,12 @@
"metadata": {},
"outputs": [],
"source": [
"mol = from_smiles(\"CC(=O)O\")"
"mol = from_smiles(\"CC(=O)O\")\n",
"mol_info = {\n",
" \"CAS\": \"64-19-7\",\n",
" \"IUPAC\": \"Acetic acid\",\n",
" \"Other Name\": \"Ethanoic acid; Ethylic acid\",\n",
"}"
]
},
{
Expand Down Expand Up @@ -158,23 +163,23 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[19.03|15:33:37] JOB plamsjob STARTED\n",
"[19.03|15:33:37] Waiting for job plamsjob to finish\n",
"[19.03|15:33:37] JOB plamsjob/conformers_uff STARTED\n",
"[19.03|15:33:37] JOB plamsjob/additional_1 STARTED\n",
"[19.03|15:33:37] JOB plamsjob/adf_conformers STARTED\n",
"[19.03|15:33:37] JOB plamsjob/adf_filter STARTED\n",
"[19.03|15:33:37] Waiting for job conformers_uff to finish\n",
"[19.03|15:33:37] Waiting for job adf_filter to finish\n",
"[19.03|15:33:37] Waiting for job additional_1 to finish\n",
"[19.03|15:33:37] Waiting for job adf_conformers to finish\n",
"[19.03|15:33:44] JOB plamsjob/conformers_uff SUCCESSFUL\n",
"[19.03|15:33:45] JOB plamsjob/additional_1 SUCCESSFUL\n",
"[19.03|15:43:18] JOB plamsjob/adf_conformers SUCCESSFUL\n",
"[19.03|15:43:19] JOB plamsjob/adf_filter SUCCESSFUL\n",
"[19.03|15:43:19] JOB plamsjob/replay STARTED\n",
"[19.03|15:44:08] JOB plamsjob/replay SUCCESSFUL\n",
"[19.03|15:44:10] JOB plamsjob SUCCESSFUL\n"
"[11.03|14:09:35] JOB plamsjob STARTED\n",
"[11.03|14:09:35] Waiting for job plamsjob to finish\n",
"[11.03|14:09:35] JOB plamsjob/conformers_uff STARTED\n",
"[11.03|14:09:35] JOB plamsjob/additional_1 STARTED\n",
"[11.03|14:09:35] JOB plamsjob/adf_conformers STARTED\n",
"[11.03|14:09:35] JOB plamsjob/adf_filter STARTED\n",
"[11.03|14:09:35] Waiting for job adf_filter to finish\n",
"[11.03|14:09:35] Waiting for job conformers_uff to finish\n",
"[11.03|14:09:35] Waiting for job additional_1 to finish\n",
"[11.03|14:09:35] Waiting for job adf_conformers to finish\n",
"[11.03|14:09:42] JOB plamsjob/conformers_uff SUCCESSFUL\n",
"[11.03|14:09:44] JOB plamsjob/additional_1 SUCCESSFUL\n",
"[11.03|14:20:21] JOB plamsjob/adf_conformers SUCCESSFUL\n",
"[11.03|14:20:22] JOB plamsjob/adf_filter SUCCESSFUL\n",
"[11.03|14:20:22] JOB plamsjob/replay STARTED\n",
"[11.03|14:21:07] JOB plamsjob/replay SUCCESSFUL\n",
"[11.03|14:21:07] JOB plamsjob SUCCESSFUL\n"
]
}
],
Expand All @@ -187,14 +192,15 @@
" final_filter=fil3,\n",
" coskf_name=\"acetic_acid\",\n",
" coskf_dir=\"test_coskfs\",\n",
" mol_info=mol_info,\n",
")\n",
"job.run()\n",
"job.results.wait()"
]
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 8,
"id": "fa86e6a5-4098-4d31-96a4-5a338d62ccfc",
"metadata": {},
"outputs": [],
Expand All @@ -204,13 +210,21 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 9,
"id": "96fae9f9-5465-494c-accf-23bcb3783843",
"metadata": {},
"outputs": [],
"source": [
"!amsview test_coskfs/acetic_acid_1.coskf"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7de25312-2f75-4209-a1e3-63ad4c388fd3",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
8 changes: 7 additions & 1 deletion examples/COSMORSConformers/cosmors_conformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@

# ## Set up conformer generator

# First, we input the acetic acid molecule with the `from_smiles` function
# First, we input the acetic acid molecule with the `from_smiles` function and provide the optional compound information that can be written to the COSKF file.

mol = from_smiles("CC(=O)O")
mol_info = {
"CAS": "64-19-7",
"IUPAC": "Acetic acid",
"Other Name": "Ethanoic acid; Ethylic acid",
}


# Now, we'll specify a conformer generator (identical to the default) that generates only 50 initial structures:
Expand Down Expand Up @@ -59,6 +64,7 @@
final_filter=fil3,
coskf_name="acetic_acid",
coskf_dir="test_coskfs",
mol_info=mol_info,
)
job.run()
job.results.wait()
Loading