Skip to content

Commit

Permalink
Fix readthedocs.yaml and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewFilipovich committed May 29, 2024
1 parent e722613 commit 888d4da
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PyCharge was developed to allow both novice and experienced users model a wide r
- Moving dipoles can be modelled by specifying the dipole's origin position as a function of time.
- Parallelized version of the dipole simulation method using [mpi4py](https://mpi4py.readthedocs.io/en/stable/) to enable the parallel execution of computationally demanding simulations on high performance computing environments to significantly improve run time.

Our computational physics paper introducing the PyCharge package is available on [arXiv](https://arxiv.org/abs/2107.12437) and includes an extensive review of the rich physics that govern the coupled dipole simulations.
Our research paper, published in [Computational Physics Communications](https://doi.org/10.1016/j.cpc.2022.108291) and available on [arXiv](https://arxiv.org/abs/2107.12437), introduces the PyCharge package and provides a comprehensive review of the rich physics that govern the coupled dipole simulations.

## Documentation

Expand Down Expand Up @@ -99,7 +99,7 @@ We welcome all bug reports and suggestions for future features and enhancements,
If you are using PyCharge for research purposes, we kindly request that you cite the following paper:

M. Filipovich and S. Hughes, [PyCharge: An open-source Python package for self-consistent electrodynamics
simulations of Lorentz oscillators and moving point charges](https://arxiv.org/abs/2107.12437), arXiv:2107.12437.
simulations of Lorentz oscillators and moving point charges](https://doi.org/10.1016/j.cpc.2022.108291), Comput. Phys. Commun. 274, 108291 (2022).

## License

Expand Down
2 changes: 1 addition & 1 deletion docs/docs_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mkdocs-material==7.1.5
python-markdown-math==0.8
mkdocstrings==0.15.1
mkdocstrings-python==1.10.3
numpy==1.20.3
dill==0.3.3
scipy==1.6.3
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PyCharge was developed to allow both novice and experienced users model a wide r
- Moving dipoles can be modelled by specifying the dipole's origin position as a function of time.
- Parallelized version of the dipole simulation method using [mpi4py](https://mpi4py.readthedocs.io/en/stable/) to enable the parallel execution of computationally demanding simulations on high performance computing environments to significantly improve run time.

Our computational physics paper introducing the PyCharge package was published in [Computer Physics Communications](https://doi.org/10.1016/j.cpc.2022.108291) and is also available on [arXiv](https://arxiv.org/abs/2107.12437). The paper includes an extensive review of the rich physics that govern the coupled dipole simulations.
Our research paper, published in [Computational Physics Communications](https://doi.org/10.1016/j.cpc.2022.108291) and available on [arXiv](https://arxiv.org/abs/2107.12437), introduces the PyCharge package and provides a comprehensive review of the rich physics that govern the coupled dipole simulations.

## Usage

Expand Down Expand Up @@ -76,7 +76,7 @@ We welcome all bug reports and suggestions for future features and enhancements,
If you are using PyCharge for research purposes, we kindly request that you cite the following paper:

M. Filipovich and S. Hughes, [PyCharge: An open-source Python package for self-consistent electrodynamics
simulations of Lorentz oscillators and moving point charges](https://arxiv.org/abs/2107.12437), Comput. Phys. Commun. 274, 108291 (2022).
simulations of Lorentz oscillators and moving point charges](https://doi.org/10.1016/j.cpc.2022.108291), Comput. Phys. Commun. 274, 108291 (2022).

## License

Expand Down
4 changes: 4 additions & 0 deletions docs/javascripts/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright (c) 2024
* All rights reserved.
*/
window.MathJax = {
tex: {
inlineMath: [["\\(", "\\)"]],
Expand Down
2 changes: 1 addition & 1 deletion examples/paper_figures/figure8.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def scaled_total_energy(dipole1, dipole2):
+ 0.5*k*(dipole1.moment_disp[0])**2)
energy2 = (0.5*dipole2.m_eff * dipole2.moment_vel[0]**2
+ 0.5*k*(dipole2.moment_disp[0])**2)
max_energy = max(max(energy1), max(energy2))
max_energy = max(max(energy1), max(energy2)) # pylint: disable=W3301
return (energy1/max_energy, energy2/max_energy)


Expand Down
2 changes: 1 addition & 1 deletion examples/paper_figures/figure9.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def scaled_total_energy(dipole1, dipole2):
+ 0.5*k*(dipole1.moment_disp[0])**2)
energy2 = (0.5*dipole2.m_eff * dipole2.moment_vel[0]**2
+ 0.5*k*(dipole2.moment_disp[0])**2)
max_energy = max(max(energy1), max(energy2))
max_energy = max(max(energy1), max(energy2)) # pylint: disable=W3301
return (energy1/max_energy, energy2/max_energy)


Expand Down
8 changes: 4 additions & 4 deletions pycharge/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def calculate_E(
E_y += E_field[1]
E_z += E_field[2]
if self.E_external is not None: # Add external E field
E_field_external = self.E_external(t, x, y, z)
E_field_external = self.E_external(t, x, y, z) # pylint: disable=E1102
E_x += E_field_external[0]
E_y += E_field_external[1]
E_z += E_field_external[2]
Expand Down Expand Up @@ -236,7 +236,7 @@ def calculate_B(
By += 1/(c*r_mag)*(rz*E_x-rx*E_z)
Bz += 1/(c*r_mag)*(rx*E_y-ry*E_x)
if self.B_external is not None: # Add external B field
B_field_external = self.B_external(t, x, y, z)
B_field_external = self.B_external(t, x, y, z) # pylint: disable=E1102
Bx += B_field_external[0]
By += B_field_external[1]
Bz += B_field_external[2]
Expand Down Expand Up @@ -461,8 +461,8 @@ def run_mpi(
"""
try:
from mpi4py import MPI # pylint: disable=import-outside-toplevel
except ImportError:
NotImplementedError('mpi4py package is not installed.')
except ImportError as exc:
raise NotImplementedError('mpi4py package is not installed.') from exc
self._init_simulation(timesteps, dt, save_E)
if file is not None and self._load(file):
return
Expand Down
8 changes: 7 additions & 1 deletion readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
version: 2

# Optional: Specify build environment details
build:
os: "ubuntu-22.04"
tools:
python: "3.7"

python:
version: 3.7
install:
- requirements: docs/docs_requirements.txt

mkdocs:
configuration: mkdocs.yml
configuration: mkdocs.yml

0 comments on commit 888d4da

Please sign in to comment.