Skip to content

Commit

Permalink
Merge branch 'python' into tutorial_04_summer_school_2020
Browse files Browse the repository at this point in the history
  • Loading branch information
RudolfWeeber authored Oct 8, 2020
2 parents 8469df0 + b724921 commit 446fd10
Show file tree
Hide file tree
Showing 15 changed files with 1,788 additions and 773 deletions.
708 changes: 449 additions & 259 deletions doc/tutorials/01-lennard_jones/01-lennard_jones.ipynb

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions doc/tutorials/02-charged_system/02-charged_system-1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
"metadata": {},
"outputs": [],
"source": [
"import espressomd\n",
"espressomd.assert_features(['WCA', 'ELECTROSTATICS'])\n",
"\n",
"from espressomd import System, interactions, electrostatics, observables, accumulators\n",
"\n",
"import numpy as np\n",
Expand Down Expand Up @@ -146,14 +149,14 @@
"* Implement a function to place the rod particles along the $x_3$ axis in the middle of the simulation box and the ions randomly distributed \n",
"* Use the signature ``setup_rod_and_counterions(system, ion_valency, counterion_type, rod_charge_dens, N_rod_beads, rod_type) ``\n",
"* Determine the number of counterions from the condition of neutrality for the whole system (the rod should be positive, the counterions negative)\n",
"* Assign the rod particles and cointerions their correct ``type``\n",
"* Assign the rod particles and counterions their correct ``type``\n",
"* Give the counterions a charge ``q`` according to their ``ion_valency``\n",
"* Give the rod particles a charge such that the ``rod_charge_dens`` is uniformely distributed along the ``N_rod_beads`` individual particles\n",
"* Give the rod particles a charge such that the ``rod_charge_dens`` is uniformly distributed along the ``N_rod_beads`` individual particles\n",
"* Fix the rod particles in space so they do not get moved if forces act upon them\n",
"* Return the newly created counterion particles\n",
"\n",
"**Hints:**\n",
"* Look into [Eespresso particle properties](http://espressomd.org/html/doc/espressomd.html?#module-espressomd.particle_data) to find the keywords to set charges and fix particles\n",
"* Look into [espresso particle properties](http://espressomd.org/html/doc/espressomd.html?#module-espressomd.particle_data) to find the keywords to set charges and to fix particles\n",
"* use np.random.random() to generate the counterion positions"
]
},
Expand Down Expand Up @@ -278,7 +281,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Before we can start the simulation, we need to remove the overlap between particles to avoid large forces which would crash the simulation. For this, we use the steepest descent integrator with a relative convergence criterium for forces and energies."
"Before we can start the simulation, we need to remove the overlap between particles to avoid large forces which would crash the simulation. For this, we use the steepest descent integrator with a relative convergence criterion for forces and energies."
]
},
{
Expand Down Expand Up @@ -715,7 +718,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"For multivalent counterions, the manning parameter $\\xi$ has to be multiplied by the valency $\\nu$. The result depends only on the product of ``rod_charge_dens`` and ``ion_velancy``, so we only need one curve"
"For multivalent counterions, the manning parameter $\\xi$ has to be multiplied by the valency $\\nu$. The result depends only on the product of ``rod_charge_dens`` and ``ion_valency``, so we only need one curve"
]
},
{
Expand Down
6 changes: 2 additions & 4 deletions doc/tutorials/02-charged_system/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ configure_tutorial_target(
scripts/nacl_units.py
scripts/nacl_units_vis.py)

nb_export(
TARGET tutorial_02 SUFFIX "1" FILE "02-charged_system-1.ipynb" HTML_RUN
VAR_SUBST
"num_steps_equilibration=200;num_configs=100;integ_steps_per_config=250")
nb_export(TARGET tutorial_02 SUFFIX "1" FILE "02-charged_system-1.ipynb"
HTML_RUN)
nb_export(
TARGET tutorial_02 SUFFIX "2" FILE "02-charged_system-2.ipynb" HTML_RUN
VAR_SUBST
Expand Down
Loading

0 comments on commit 446fd10

Please sign in to comment.