Implementing the PICMI standard in an existing code
Warning
This section is currently in development.
In order to implement the PICMI standard, a given code should go through the following step:
Define a Python package (ideally, whose name is the name of the code itself), which contains a module
picmi:The
picmimodule should be importable with the following syntax:from <python_package> import picmi
where
<python_package>should be replaced by the name of the code.Define the variable
picmi.codenameas a string containing the name of the code.Create a sub-module
picmi.constants, that defines the constants described in Constants.Define the PICMI classes that a user of this code would typically use, among those defined in Definition of the standard.
This should be done by defining a subclass of the corresponding class in the package
picmistandard, and defining itsinitmethod. For instance:import picmistandard class Simulation( picmistandard.PICMI_Simulation ): def init(self, kw): # Code-specific initialization self.initialized_space_charge_sources = False