Difference between revisions of "ScatterSim:API"
(Created page with "== ScatterSim API == This page documents the general API for the ScatterSim code. === Structure === In general, the objects in the ScatterSim code used to generate simulation...") |
(No difference)
|
Revision as of 16:29, 10 July 2017
Contents
ScatterSim API
This page documents the general API for the ScatterSim code.
Structure
In general, the objects in the ScatterSim code used to generate simulations are either:
- NanoObject : the base object
- CompositeNanoObject : an arrangement of NanoObject objects
- Lattice objects : NanoObjects that are assembled into a lattice.
NanoObjects or Composite NanoObjects
Each of these elements is initialized by calling their initialization class. To initialize a NanoObject or CompositeNanoObject, potential arguments must be supplied:
from ScatterSim.NanoObjects import SphereNanoObject pargs = {"radius" : 10} sphere = SphereNanoObject(pargs=pargs)
where pargs is a dictionary containing the parameters that describe the system. Here, a SphereNanoObject only requires a radius as a parameter. Other more complex objects, like CylinderNanoObject may require more parameters (such as height in this case).
Creating a new CompositeNanoObject
Sometimes the objects available are not enough and a more complex objects is needed. Objects may be compounded into more complex NanoObject objects by creating a new CompositeNanoObject.