aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/Particles.py
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pywarpx/Particles.py')
-rw-r--r--Python/pywarpx/Particles.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Python/pywarpx/Particles.py b/Python/pywarpx/Particles.py
index e7bac7e10..757a49d00 100644
--- a/Python/pywarpx/Particles.py
+++ b/Python/pywarpx/Particles.py
@@ -1,6 +1,6 @@
from .Bucket import Bucket
-particles = Bucket('particles', nspecies=0, species_names='')
+particles = Bucket('particles', nspecies=0, species_names=None)
particles_list = []
electrons = Bucket('electrons')
@@ -22,3 +22,8 @@ particle_dict = {'electrons':electrons,
'positrons':positrons,
'protons':protons
}
+
+def newspecies(name):
+ result = Bucket(name)
+ particles_list.append(result)
+ return result