Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
TissueForge::py Namespace Reference

Tissue Forge Python language support. More...

Classes

struct  BoundaryConditionsArgsContainerPy
 
struct  CustomForcePy
 
struct  EventPy
 
struct  EventPyExecutor
 
struct  EventPyInvokePyExecutor
 
struct  EventPyPredicatePyExecutor
 
struct  KeyEventPyExecutor
 
struct  ParticleEventPy
 
struct  ParticleEventPyInvokePyExecutor
 
struct  ParticleEventPyPredicatePyExecutor
 
struct  ParticleEventSinglePy
 
struct  ParticleTimeEventPy
 
struct  ParticleTimeEventPyInvokePyExecutor
 
struct  ParticleTimeEventPyPredicatePyExecutor
 
struct  PotentialPy
 
struct  SimulatorPy
 
struct  TimeEventPy
 
struct  TimeEventPyInvokePyExecutor
 
struct  TimeEventPyPredicatePyExecutor
 

Typedefs

using TimeEventPyList = event::EventListT<TimeEventPy>
 

Enumerations

enum class  BoundaryTypeFlags : int {
  BOUNDARY_NONE = space_periodic_none , PERIODIC_X = space_periodic_x , PERIODIC_Y = space_periodic_y , PERIODIC_Z = space_periodic_z ,
  PERIODIC_FULL = space_periodic_full , PERIODIC_GHOST_X = space_periodic_ghost_x , PERIODIC_GHOST_Y = space_periodic_ghost_y , PERIODIC_GHOST_Z = space_periodic_ghost_z ,
  PERIODIC_GHOST_FULL = space_periodic_ghost_full , FREESLIP_X = SPACE_FREESLIP_X , FREESLIP_Y = SPACE_FREESLIP_Y , FREESLIP_Z = SPACE_FREESLIP_Z ,
  FREESLIP_FULL = SPACE_FREESLIP_FULL
}
 

Functions

HRESULT particles (Potential *p, Particle *a, Particle *b)
 Bind a potential to a pair of particles.
 
HRESULT types (Potential *p, ParticleType *a, ParticleType *b, bool bound=0)
 Bind a potential to a pair of particle types.
 
HRESULT boundary_conditions (Potential *p, ParticleType *t)
 Bind a potential to a pair of particle type and all boundary conditions.
 
HRESULT boundary_condition (Potential *p, BoundaryCondition *bc, ParticleType *t)
 Bind a potential to a pair of particle type and a boundary conditions.
 
HRESULT force (Force *force, ParticleType *a_type)
 Bind a force to a particle type.
 
HRESULT force (Force *force, ParticleType *a_type, const std::string &coupling_symbol)
 Bind a force to a particle type with magnitude proportional to a species amount.
 
std::vector< BondHandle_bondsPy (Potential *potential, ParticleList *particles, const FloatP_t &cutoff, std::vector< std::pair< ParticleType *, ParticleType * > * > *pairs=NULL, FloatP_t *half_life=NULL, FloatP_t *bond_energy=NULL, uint32_t flags=0)
 Create bonds for a set of pairs of particles.
 
std::vector< BondHandle_spherePy (ParticleList *particles, Potential *potential, const int &n, FVector3 *center=NULL, const FloatP_t &radius=1.0, FloatP_t *phi0=NULL, FloatP_t *phi1=NULL, ParticleType *type=NULL)
 
PyObject * Import_ImportString (const std::string &name)
 
PyObject * iPython_Get ()
 
bool terminalInteractiveShell ()
 
bool ZMQInteractiveShell ()
 
template<typename T>
bool check (PyObject *o)
 
PyObject * py_arg (const char *name, int index, PyObject *_args, PyObject *_kwargs)
 
std::string repr (PyObject *o)
 
std::string str (PyObject *o)
 
std::string pyerror_str ()
 
template<typename T>
arg (const char *name, int index, PyObject *args, PyObject *kwargs)
 
template<typename T>
arg (const char *name, int index, PyObject *args, PyObject *kwargs, T deflt)
 
void print_performance_counters ()
 
HRESULT screenshot (const std::string &filePath)
 Save a screenshot of the current scene.
 
HRESULT screenshot (const std::string &filePath, const bool &decorate, const FVector3 &bgcolor)
 Save a screenshot of the current scene.
 
bool camera_is_lagging ()
 
HRESULT camera_enable_lagging ()
 
HRESULT camera_disable_lagging ()
 
HRESULT camera_toggle_lagging ()
 
float camera_get_lagging ()
 
HRESULT camera_set_lagging (const float &lagging)
 
bool context_has_current ()
 
HRESULT context_make_current ()
 
HRESULT context_release ()
 
HRESULT camera_move_to (const FVector3 &eye, const FVector3 &center, const FVector3 &up)
 Set the camera view parameters.
 
HRESULT camera_move_to (const FVector3 &center, const FQuaternion &rotation, const float &zoom)
 Set the camera view parameters.
 
HRESULT camera_view_bottom ()
 Move the camera to view the domain from the bottm.
 
HRESULT camera_view_top ()
 Move the camera to view the domain from the top.
 
HRESULT camera_view_left ()
 Move the camera to view the domain from the left.
 
HRESULT camera_view_right ()
 Move the camera to view the domain from the right.
 
HRESULT camera_view_back ()
 Move the camera to view the domain from the back.
 
HRESULT camera_view_front ()
 Move the camera to view the domain from the front.
 
HRESULT camera_reset ()
 Reset the camera.
 
HRESULT camera_rotate_mouse (const iVector2 &mousePos)
 
HRESULT camera_translate_mouse (const iVector2 &mousePos)
 
HRESULT camera_translate_down ()
 Translate the camera down.
 
HRESULT camera_translate_up ()
 Translate the camera up.
 
HRESULT camera_translate_right ()
 Translate the camera right.
 
HRESULT camera_translate_left ()
 Translate the camera left.
 
HRESULT camera_translate_forward ()
 Translate the camera forward.
 
HRESULT camera_translate_backward ()
 Translate the camera backward.
 
HRESULT camera_rotate_down ()
 Rotate the camera down.
 
HRESULT camera_rotate_up ()
 Rotate the camera up.
 
HRESULT camera_rotate_left ()
 Rotate the camera left.
 
HRESULT camera_rotate_right ()
 Rotate the camera right.
 
HRESULT camera_roll_left ()
 Roll the camera left.
 
HRESULT camera_roll_right ()
 Rotate the camera right.
 
HRESULT camera_zoom_in ()
 Zoom the camera in.
 
HRESULT camera_zoom_out ()
 Zoom the camera out.
 
HRESULT camera_init_mouse (const iVector2 &mousePos)
 
HRESULT camera_translate_by (const FVector2 &trans)
 
HRESULT camera_zoom_by (const float &delta)
 Zoom the camera by an increment in distance.
 
HRESULT camera_zoom_to (const float &distance)
 Zoom the camera to a distance.
 
HRESULT camera_rotate_to_axis (const FVector3 &axis, const float &distance)
 Rotate the camera to a point from the view center a distance along an axis.
 
HRESULT camera_rotate_to_euler_angle (const FVector3 &angles)
 Rotate the camera to a set of Euler angles.
 
HRESULT camera_rotate_by_euler_angle (const FVector3 &angles)
 Rotate the camera by a set of Euler angles.
 
FVector3 camera_center ()
 Get the current camera view center position.
 
FQuaternion camera_rotation ()
 Get the current camera rotation.
 
float camera_zoom ()
 Get the current camera zoom.
 
struct rendering::UniverseRendererget_renderer ()
 Get the universe renderer.
 
const bool get_rendering_3d_bonds ()
 
void set_rendering_3d_bonds (const bool &_flag)
 
void toggle_rendering_3d_bonds ()
 
const bool get_rendering_3d_angles ()
 
void set_rendering_3d_angles (const bool &_flag)
 
void toggle_rendering_3d_angles ()
 
const bool get_rendering_3d_dihedrals ()
 
void set_rendering_3d_dihedrals (const bool &_flag)
 
void toggle_rendering_3d_dihedrals ()
 
void set_rendering_3d_all (const bool &_flag)
 
void toggle_rendering_3d_all ()
 
FloatP_t get_line_width ()
 
HRESULT set_line_width (const FloatP_t &lineWidth)
 
FloatP_t get_line_width_min ()
 
FloatP_t get_line_width_max ()
 
FVector3 get_ambient_color ()
 Get the ambient color.
 
HRESULT set_ambient_color (const FVector3 &color)
 Set the ambient color.
 
HRESULT set_ambient_color (const FVector3 &color, const unsigned int &srFlag)
 Set the ambient color of a subrenderer.
 
FVector3 get_diffuse_color ()
 Get the diffuse color.
 
HRESULT set_diffuse_color (const FVector3 &color)
 Set the diffuse color.
 
HRESULT set_diffuse_color (const FVector3 &color, const unsigned int &srFlag)
 Set the diffuse color of a subrenderer.
 
FVector3 get_specular_color ()
 Get specular color.
 
HRESULT set_specular_color (const FVector3 &color)
 Set the specular color.
 
HRESULT set_specular_color (const FVector3 &color, const unsigned int &srFlag)
 Set the specular color of a subrenderer.
 
float get_shininess ()
 Get the shininess.
 
HRESULT set_shininess (const float &shininess)
 Set the shininess.
 
HRESULT set_shininess (const float &shininess, const unsigned int &srFlag)
 Set the shininess of a subrenderer.
 
FVector3 get_grid_color ()
 Get the grid color.
 
HRESULT set_grid_color (const FVector3 &color)
 Set the grid color.
 
FVector3 get_scene_box_color ()
 Get the scene box color.
 
HRESULT set_scene_box_color (const FVector3 &color)
 Set the scene box color.
 
FVector3 get_light_direction ()
 Get the light direction.
 
HRESULT set_light_direction (const FVector3 &lightDir)
 Set the light direction.
 
HRESULT set_light_direction (const FVector3 &lightDir, const unsigned int &srFlag)
 Set the light direction of a subrenderer.
 
FVector3 get_light_color ()
 Get the light color.
 
HRESULT set_light_color (const FVector3 &color)
 Set the light color.
 
HRESULT set_light_color (const FVector3 &color, const unsigned int &srFlag)
 Set the light color of a subrenderer.
 
FVector3 get_background_color ()
 Get the background color.
 
HRESULT set_background_color (const FVector3 &color)
 Set the background color.
 
bool decorated ()
 Test whether the rendered scene is decorated.
 
HRESULT decorate_scene (const bool &decorate)
 Set flag to draw/not draw scene decorators (e.g., grid)
 
bool showing_discretization ()
 Test whether discretization is current shown.
 
HRESULT show_discretization (const bool &show)
 Set flag to draw/not draw discretization.
 
FVector3 get_discretizationColor ()
 Get the current color of the discretization grid.
 
HRESULT set_discretizationColor (const FVector3 &color)
 Set the color of the discretization grid.
 
HRESULT view_reshape (const iVector2 &windowSize)
 
std::string performance_counters ()
 
std::unordered_map< std::string bool > cpu_info ()
 Get CPU info.
 
std::unordered_map< std::string bool > compile_flags ()
 Get compiler flags of this installation.
 
std::unordered_map< std::string std::string > gl_info ()
 Get OpenGL info.
 
std::string egl_info ()
 Get EGL info.
 
PyObject * image_data ()
 
bool is_terminal_interactive ()
 Test whether Tissue Forge is running in an interactive terminal.
 
bool is_jupyter_notebook ()
 Test whether Tissue Forge is running in a Jupyter notebook.
 
PyObject * jwidget_init (PyObject *args, PyObject *kwargs)
 
PyObject * jwidget_run (PyObject *args, PyObject *kwargs)
 
std::vector< std::string > color_mapper_names ()
 Get all available color mapper names.
 
int add_render_arrow (rendering::ArrowData *arrow)
 Adds a vector visualization specification.
 
std::pair< int rendering::ArrowData * > add_render_arrow (const FVector3 &position, const FVector3 &components, const rendering::Style &style, const float &scale=1.0)
 Adds a vector visualization specification.
 
HRESULT remove_render_arrow (const int &arrowId)
 Removes a vector visualization specification.
 
rendering::ArrowDataget_render_arrow (const int &arrowId)
 Gets a vector visualization specification.
 
EventPyonEvent (EventPyInvokePyExecutor *invokeExecutor, EventPyPredicatePyExecutor *predicateExecutor=NULL)
 Creates an event using prescribed invoke and predicate python function executors.
 
ParticleEventPyonParticleEvent (ParticleType *targetType, ParticleEventPyInvokePyExecutor *invokeExecutor, ParticleEventPyPredicatePyExecutor *predicateExecutor, const std::string &selector="default")
 Creates a particle event using prescribed invoke and predicate python function executors.
 
ParticleEventSinglePyonParticleEventSingle (ParticleType *targetType, ParticleEventPyInvokePyExecutor *invokeExecutor, ParticleEventPyPredicatePyExecutor *predicateExecutor)
 Creates a single particle event using prescribed invoke and predicate python function executors.
 
ParticleTimeEventPyonParticleTimeEvent (ParticleType *targetType, const FloatP_t &period, ParticleTimeEventPyInvokePyExecutor *invokeExecutor, ParticleTimeEventPyPredicatePyExecutor *predicateExecutor=NULL, const std::string &distribution="default", const FloatP_t &start_time=0.0, const FloatP_t &end_time=-1.0, const std::string &selector="default")
 Creates a time-dependent particle event using prescribed invoke and predicate python function executors.
 
HRESULT _setIPythonInputHook (PyObject *_ih)
 
HRESULT _onIPythonNotReady ()
 
PyObject * SimulatorPy_init (PyObject *args, PyObject *kwargs)
 Initialize a simulation in Python.
 
TimeEventPyonTimeEvent (const FloatP_t &period, TimeEventPyInvokePyExecutor *invokeExecutor, TimeEventPyPredicatePyExecutor *predicateExecutor=NULL, const std::string &distribution="default", const FloatP_t &start_time=0, const FloatP_t &end_time=-1)
 Creates a time-dependent event using prescribed invoke and predicate python function executors.
 

Detailed Description

Tissue Forge Python language support.

Function Documentation

◆ _bondsPy()

std::vector< BondHandle > TissueForge::py::_bondsPy ( Potential * potential,
ParticleList * particles,
const FloatP_t & cutoff,
std::vector< std::pair< ParticleType *, ParticleType * > * > * pairs = NULL,
FloatP_t * half_life = NULL,
FloatP_t * bond_energy = NULL,
uint32_t flags = 0 )

Create bonds for a set of pairs of particles.

Parameters
potentialThe bond potential
particlesThe list of particles
cutoffInteraction cutoff
pairsPairs to bind
half_lifeBond half life
bond_energyBond dissociation energy
flagsBond flags
Returns
std::vector<BondHandle*>

◆ add_render_arrow() [1/2]

std::pair< int rendering::ArrowData * > TissueForge::py::add_render_arrow ( const FVector3 & position,
const FVector3 & components,
const rendering::Style & style,
const float & scale = 1.0 )

Adds a vector visualization specification.

The passed pointer is borrowed. The client is responsible for maintaining the underlying data. The returned integer can be used to reference the arrow when doing subsequent operations with the renderer (e.g., removing an arrow from the scene).

Parameters
positionposition of vector
componentscomponents of vector
stylestyle of vector
scalescale of vector; defaults to 1.0
Returns
id of arrow according to the renderer and arrow

◆ add_render_arrow() [2/2]

int TissueForge::py::add_render_arrow ( rendering::ArrowData * arrow)

Adds a vector visualization specification.

The passed pointer is borrowed. The client is responsible for maintaining the underlying data. The returned integer can be used to reference the arrow when doing subsequent operations with the renderer (e.g., removing an arrow from the scene).

Parameters
arrowpointer to visualization specs
Returns
id of arrow according to the renderer

◆ boundary_condition()

HRESULT TissueForge::py::boundary_condition ( Potential * p,
BoundaryCondition * bc,
ParticleType * t )

Bind a potential to a pair of particle type and a boundary conditions.

Automatically updates when running on a CUDA device.

Parameters
pThe potential
bcThe boundary condition
tThe particle type
Returns
HRESULT

◆ boundary_conditions()

HRESULT TissueForge::py::boundary_conditions ( Potential * p,
ParticleType * t )

Bind a potential to a pair of particle type and all boundary conditions.

Automatically updates when running on a CUDA device.

Parameters
pThe potential
tThe particle type
Returns
HRESULT

◆ camera_center()

FVector3 TissueForge::py::camera_center ( )

Get the current camera view center position.

Returns
FVector3

◆ camera_disable_lagging()

HRESULT TissueForge::py::camera_disable_lagging ( )

Disable camera lagging

◆ camera_enable_lagging()

HRESULT TissueForge::py::camera_enable_lagging ( )

Enable camera lagging

◆ camera_get_lagging()

float TissueForge::py::camera_get_lagging ( )

Get the camera lagging

◆ camera_is_lagging()

bool TissueForge::py::camera_is_lagging ( )

Test whether the camera is lagging

◆ camera_move_to() [1/2]

HRESULT TissueForge::py::camera_move_to ( const FVector3 & center,
const FQuaternion & rotation,
const float & zoom )

Set the camera view parameters.

Parameters
centertarget camera view center position
rotationtarget camera rotation
zoomtarget camera zoom
Returns
HRESULT

◆ camera_move_to() [2/2]

HRESULT TissueForge::py::camera_move_to ( const FVector3 & eye,
const FVector3 & center,
const FVector3 & up )

Set the camera view parameters.

Parameters
eyecamera eye
centerview center
upview upward direction
Returns
HRESULT

◆ camera_reset()

HRESULT TissueForge::py::camera_reset ( )

Reset the camera.

Returns
HRESULT

◆ camera_roll_left()

HRESULT TissueForge::py::camera_roll_left ( )

Roll the camera left.

Returns
HRESULT

◆ camera_roll_right()

HRESULT TissueForge::py::camera_roll_right ( )

Rotate the camera right.

Returns
HRESULT

◆ camera_rotate_by_euler_angle()

HRESULT TissueForge::py::camera_rotate_by_euler_angle ( const FVector3 & angles)

Rotate the camera by a set of Euler angles.

Rotations are Z-Y-X.

Parameters
angles
Returns
HRESULT

◆ camera_rotate_down()

HRESULT TissueForge::py::camera_rotate_down ( )

Rotate the camera down.

Returns
HRESULT

◆ camera_rotate_left()

HRESULT TissueForge::py::camera_rotate_left ( )

Rotate the camera left.

Returns
HRESULT

◆ camera_rotate_right()

HRESULT TissueForge::py::camera_rotate_right ( )

Rotate the camera right.

Returns
HRESULT

◆ camera_rotate_to_axis()

HRESULT TissueForge::py::camera_rotate_to_axis ( const FVector3 & axis,
const float & distance )

Rotate the camera to a point from the view center a distance along an axis.

Only rotates the view to the given eye position.

Parameters
axisaxis from the view center
distancedistance along the axis
Returns
HRESULT

◆ camera_rotate_to_euler_angle()

HRESULT TissueForge::py::camera_rotate_to_euler_angle ( const FVector3 & angles)

Rotate the camera to a set of Euler angles.

Rotations are Z-Y-X.

Parameters
angles
Returns
HRESULT

◆ camera_rotate_up()

HRESULT TissueForge::py::camera_rotate_up ( )

Rotate the camera up.

Returns
HRESULT

◆ camera_rotation()

FQuaternion TissueForge::py::camera_rotation ( )

Get the current camera rotation.

Returns
FQuaternion

◆ camera_set_lagging()

HRESULT TissueForge::py::camera_set_lagging ( const float & lagging)

Set the camera lagging. Value must be in [0, 1)

◆ camera_toggle_lagging()

HRESULT TissueForge::py::camera_toggle_lagging ( )

Toggle camera lagging

◆ camera_translate_backward()

HRESULT TissueForge::py::camera_translate_backward ( )

Translate the camera backward.

Returns
HRESULT

◆ camera_translate_down()

HRESULT TissueForge::py::camera_translate_down ( )

Translate the camera down.

Returns
HRESULT

◆ camera_translate_forward()

HRESULT TissueForge::py::camera_translate_forward ( )

Translate the camera forward.

Returns
HRESULT

◆ camera_translate_left()

HRESULT TissueForge::py::camera_translate_left ( )

Translate the camera left.

Returns
HRESULT

◆ camera_translate_right()

HRESULT TissueForge::py::camera_translate_right ( )

Translate the camera right.

Returns
HRESULT

◆ camera_translate_up()

HRESULT TissueForge::py::camera_translate_up ( )

Translate the camera up.

Returns
HRESULT

◆ camera_view_back()

HRESULT TissueForge::py::camera_view_back ( )

Move the camera to view the domain from the back.

Returns
HRESULT

◆ camera_view_bottom()

HRESULT TissueForge::py::camera_view_bottom ( )

Move the camera to view the domain from the bottm.

Returns
HRESULT

◆ camera_view_front()

HRESULT TissueForge::py::camera_view_front ( )

Move the camera to view the domain from the front.

Returns
HRESULT

◆ camera_view_left()

HRESULT TissueForge::py::camera_view_left ( )

Move the camera to view the domain from the left.

Returns
HRESULT

◆ camera_view_right()

HRESULT TissueForge::py::camera_view_right ( )

Move the camera to view the domain from the right.

Returns
HRESULT

◆ camera_view_top()

HRESULT TissueForge::py::camera_view_top ( )

Move the camera to view the domain from the top.

Returns
HRESULT

◆ camera_zoom()

float TissueForge::py::camera_zoom ( )

Get the current camera zoom.

Returns
float

◆ camera_zoom_by()

HRESULT TissueForge::py::camera_zoom_by ( const float & delta)

Zoom the camera by an increment in distance.

Positive values zoom in.

Parameters
deltazoom increment
Returns
HRESULT

◆ camera_zoom_in()

HRESULT TissueForge::py::camera_zoom_in ( )

Zoom the camera in.

Returns
HRESULT

◆ camera_zoom_out()

HRESULT TissueForge::py::camera_zoom_out ( )

Zoom the camera out.

Returns
HRESULT

◆ camera_zoom_to()

HRESULT TissueForge::py::camera_zoom_to ( const float & distance)

Zoom the camera to a distance.

Parameters
distancezoom distance
Returns
HRESULT

◆ check()

template<typename T>
bool TissueForge::py::check ( PyObject * o)

check if type can be converted

◆ compile_flags()

std::unordered_map< std::string bool > TissueForge::py::compile_flags ( )

Get compiler flags of this installation.

Returns
std::unordered_map<std::string, bool>

◆ cpu_info()

std::unordered_map< std::string bool > TissueForge::py::cpu_info ( )

Get CPU info.

Returns
std::unordered_map<std::string, bool>

◆ decorate_scene()

HRESULT TissueForge::py::decorate_scene ( const bool & decorate)

Set flag to draw/not draw scene decorators (e.g., grid)

Parameters
decorateflag; true says to decorate
Returns
HRESULT

◆ decorated()

bool TissueForge::py::decorated ( )

Test whether the rendered scene is decorated.

Returns
true
false

◆ egl_info()

std::string TissueForge::py::egl_info ( )

Get EGL info.

Returns
std::string

◆ force() [1/2]

HRESULT TissueForge::py::force ( Force * force,
ParticleType * a_type )

Bind a force to a particle type.

Parameters
forceThe force
a_typeThe particle type
Returns
HRESULT

◆ force() [2/2]

HRESULT TissueForge::py::force ( Force * force,
ParticleType * a_type,
const std::string & coupling_symbol )

Bind a force to a particle type with magnitude proportional to a species amount.

Parameters
forceThe force
a_typeThe particle type
coupling_symbolThe symbol of the species
Returns
HRESULT

◆ get_ambient_color()

FVector3 TissueForge::py::get_ambient_color ( )

Get the ambient color.

Returns
FVector3

◆ get_background_color()

FVector3 TissueForge::py::get_background_color ( )

Get the background color.

Returns
FVector3

◆ get_diffuse_color()

FVector3 TissueForge::py::get_diffuse_color ( )

Get the diffuse color.

Returns
FVector3

◆ get_discretizationColor()

FVector3 TissueForge::py::get_discretizationColor ( )

Get the current color of the discretization grid.

Returns
FVector3

◆ get_grid_color()

FVector3 TissueForge::py::get_grid_color ( )

Get the grid color.

Returns
FVector3

◆ get_light_color()

FVector3 TissueForge::py::get_light_color ( )

Get the light color.

Returns
FVector3

◆ get_light_direction()

FVector3 TissueForge::py::get_light_direction ( )

Get the light direction.

Returns
FVector3

◆ get_line_width()

FloatP_t TissueForge::py::get_line_width ( )

Get the line width

◆ get_line_width_max()

FloatP_t TissueForge::py::get_line_width_max ( )

Get the maximum line width

◆ get_line_width_min()

FloatP_t TissueForge::py::get_line_width_min ( )

Get the minimum line width

◆ get_render_arrow()

rendering::ArrowData * TissueForge::py::get_render_arrow ( const int & arrowId)

Gets a vector visualization specification.

Parameters
arrowIdid of arrow according to the renderer

◆ get_renderer()

struct rendering::UniverseRenderer * TissueForge::py::get_renderer ( )

Get the universe renderer.

Returns
struct rendering::UniverseRenderer*

◆ get_rendering_3d_angles()

const bool TissueForge::py::get_rendering_3d_angles ( )

Get whether angles are renderered with 3D objects

◆ get_rendering_3d_bonds()

const bool TissueForge::py::get_rendering_3d_bonds ( )

Get whether bonds are renderered with 3D objects

◆ get_rendering_3d_dihedrals()

const bool TissueForge::py::get_rendering_3d_dihedrals ( )

Get whether dihedrals are renderered with 3D objects

◆ get_scene_box_color()

FVector3 TissueForge::py::get_scene_box_color ( )

Get the scene box color.

Returns
FVector3

◆ get_shininess()

float TissueForge::py::get_shininess ( )

Get the shininess.

Returns
float

◆ get_specular_color()

FVector3 TissueForge::py::get_specular_color ( )

Get specular color.

Returns
FVector3

◆ gl_info()

std::unordered_map< std::string std::string > TissueForge::py::gl_info ( )

Get OpenGL info.

Returns
std::unordered_map<std::string, std::string>

◆ is_jupyter_notebook()

bool TissueForge::py::is_jupyter_notebook ( )

Test whether Tissue Forge is running in a Jupyter notebook.

Returns
true if running in a Jupyter notebook
false

◆ is_terminal_interactive()

bool TissueForge::py::is_terminal_interactive ( )

Test whether Tissue Forge is running in an interactive terminal.

Returns
true if running in an interactive terminal
false

◆ onEvent()

EventPy * TissueForge::py::onEvent ( EventPyInvokePyExecutor * invokeExecutor,
EventPyPredicatePyExecutor * predicateExecutor = NULL )

Creates an event using prescribed invoke and predicate python function executors.

Parameters
invokeExecutoran invoke python function executor; evaluated when an event occurs
predicateExecutora predicate python function executor; evaluated to determine if an event occurs
Returns
EventPy*

◆ onParticleEvent()

ParticleEventPy * TissueForge::py::onParticleEvent ( ParticleType * targetType,
ParticleEventPyInvokePyExecutor * invokeExecutor,
ParticleEventPyPredicatePyExecutor * predicateExecutor,
const std::string & selector = "default" )

Creates a particle event using prescribed invoke and predicate python function executors.

Parameters
targetTypetarget particle type
invokeExecutoran invoke python function executor; evaluated when an event occurs
predicateExecutora predicate python function executor; evaluated to determine if an event occurs
selectorname of the function that selects the next particle
Returns
ParticleEventPy*

◆ onParticleEventSingle()

ParticleEventSinglePy * TissueForge::py::onParticleEventSingle ( ParticleType * targetType,
ParticleEventPyInvokePyExecutor * invokeExecutor,
ParticleEventPyPredicatePyExecutor * predicateExecutor )

Creates a single particle event using prescribed invoke and predicate python function executors.

Parameters
targetTypetarget particle type
invokeExecutoran invoke python function executor; evaluated when an event occurs
predicateExecutora predicate python function executor; evaluated to determine if an event occurs
Returns
ParticleEventSinglePy*

◆ onParticleTimeEvent()

ParticleTimeEventPy * TissueForge::py::onParticleTimeEvent ( ParticleType * targetType,
const FloatP_t & period,
ParticleTimeEventPyInvokePyExecutor * invokeExecutor,
ParticleTimeEventPyPredicatePyExecutor * predicateExecutor = NULL,
const std::string & distribution = "default",
const FloatP_t & start_time = 0.0,
const FloatP_t & end_time = -1.0,
const std::string & selector = "default" )

Creates a time-dependent particle event using prescribed invoke and predicate python function executors.

Parameters
targetTypetarget particle type
periodperiod of evaluations
invokeExecutoran invoke python function executor; evaluated when an event occurs
predicateExecutora predicate python function executor; evaluated to determine if an event occurs
distributionname of the function that sets the next evaulation time
start_timetime at which evaluations begin
end_timetime at which evaluations end
selectorname of the function that selects the next particle
Returns
ParticleTimeEventPy*

◆ onTimeEvent()

TimeEventPy * TissueForge::py::onTimeEvent ( const FloatP_t & period,
TimeEventPyInvokePyExecutor * invokeExecutor,
TimeEventPyPredicatePyExecutor * predicateExecutor = NULL,
const std::string & distribution = "default",
const FloatP_t & start_time = 0,
const FloatP_t & end_time = -1 )

Creates a time-dependent event using prescribed invoke and predicate python function executors.

Parameters
periodperiod of evaluations
invokeExecutoran invoke python function executor; evaluated when an event occurs
predicateExecutora predicate python function executor; evaluated to determine if an event occurs
distributionname of the function that sets the next evaulation time
start_timetime at which evaluations begin
end_timetime at which evaluations end
Returns
TimeEventPy*

◆ particles()

HRESULT TissueForge::py::particles ( Potential * p,
Particle * a,
Particle * b )

Bind a potential to a pair of particles.

Parameters
pThe potential
aThe first particle
bThe second particle
Returns
HRESULT

◆ py_arg()

PyObject * TissueForge::py::py_arg ( const char * name,
int index,
PyObject * _args,
PyObject * _kwargs )

grab either the i'th arg from the args, or keywords.

gets a reference to the object, NULL if not exist.

◆ pyerror_str()

std::string TissueForge::py::pyerror_str ( )

get the python error string, empty string if no error.

◆ remove_render_arrow()

HRESULT TissueForge::py::remove_render_arrow ( const int & arrowId)

Removes a vector visualization specification.

The removed pointer is only forgotten. The client is responsible for clearing the underlying data.

Parameters
arrowIdid of arrow according to the renderer

◆ repr()

std::string TissueForge::py::repr ( PyObject * o)

gets the repr / str representations of python objects

◆ screenshot() [1/2]

HRESULT TissueForge::py::screenshot ( const std::string & filePath)

Save a screenshot of the current scene.

File formats currently supported are

  • Windows Bitmap (.bmp)
  • Radiance HDR (.hdr)
  • JPEG (.jpe, .jpg, .jpeg)
  • PNG (.png)
  • Truevision TGA (.tga)
Parameters
filePathpath of file to save
Returns
HRESULT

◆ screenshot() [2/2]

HRESULT TissueForge::py::screenshot ( const std::string & filePath,
const bool & decorate,
const FVector3 & bgcolor )

Save a screenshot of the current scene.

File formats currently supported are

  • Windows Bitmap (.bmp)
  • Radiance HDR (.hdr)
  • JPEG (.jpe, .jpg, .jpeg)
  • PNG (.png)
  • Truevision TGA (.tga)
Parameters
filePathpath of file to save
decorateflag to decorate the scene in the screenshot
bgcolorbackground color of the scene in the screenshot
Returns
HRESULT

◆ set_ambient_color() [1/2]

HRESULT TissueForge::py::set_ambient_color ( const FVector3 & color)

Set the ambient color.

Parameters
color
Returns
HRESULT

◆ set_ambient_color() [2/2]

HRESULT TissueForge::py::set_ambient_color ( const FVector3 & color,
const unsigned int & srFlag )

Set the ambient color of a subrenderer.

Parameters
color
srFlag
Returns
HRESULT

◆ set_background_color()

HRESULT TissueForge::py::set_background_color ( const FVector3 & color)

Set the background color.

Parameters
color
Returns
HRESULT

◆ set_diffuse_color() [1/2]

HRESULT TissueForge::py::set_diffuse_color ( const FVector3 & color)

Set the diffuse color.

Parameters
color
Returns
HRESULT

◆ set_diffuse_color() [2/2]

HRESULT TissueForge::py::set_diffuse_color ( const FVector3 & color,
const unsigned int & srFlag )

Set the diffuse color of a subrenderer.

Parameters
color
srFlag
Returns
HRESULT

◆ set_discretizationColor()

HRESULT TissueForge::py::set_discretizationColor ( const FVector3 & color)

Set the color of the discretization grid.

Parameters
color
Returns
HRESULT

◆ set_grid_color()

HRESULT TissueForge::py::set_grid_color ( const FVector3 & color)

Set the grid color.

Parameters
color
Returns
HRESULT

◆ set_light_color() [1/2]

HRESULT TissueForge::py::set_light_color ( const FVector3 & color)

Set the light color.

Parameters
color
Returns
HRESULT

◆ set_light_color() [2/2]

HRESULT TissueForge::py::set_light_color ( const FVector3 & color,
const unsigned int & srFlag )

Set the light color of a subrenderer.

Parameters
color
srFlag
Returns
HRESULT

◆ set_light_direction() [1/2]

HRESULT TissueForge::py::set_light_direction ( const FVector3 & lightDir)

Set the light direction.

Parameters
lightDir
Returns
HRESULT

◆ set_light_direction() [2/2]

HRESULT TissueForge::py::set_light_direction ( const FVector3 & lightDir,
const unsigned int & srFlag )

Set the light direction of a subrenderer.

Parameters
lightDir
srFlag
Returns
HRESULT

◆ set_line_width()

HRESULT TissueForge::py::set_line_width ( const FloatP_t & lineWidth)

Set the line width

◆ set_rendering_3d_all()

void TissueForge::py::set_rendering_3d_all ( const bool & _flag)

Set whether bonds, angle and dihedrals are renderered with 3D objects

◆ set_rendering_3d_angles()

void TissueForge::py::set_rendering_3d_angles ( const bool & _flag)

Set whether angles are renderered with 3D objects

◆ set_rendering_3d_bonds()

void TissueForge::py::set_rendering_3d_bonds ( const bool & _flag)

Set whether bonds are renderered with 3D objects

◆ set_rendering_3d_dihedrals()

void TissueForge::py::set_rendering_3d_dihedrals ( const bool & _flag)

Set whether dihedrals are renderered with 3D objects

◆ set_scene_box_color()

HRESULT TissueForge::py::set_scene_box_color ( const FVector3 & color)

Set the scene box color.

Parameters
color
Returns
HRESULT

◆ set_shininess() [1/2]

HRESULT TissueForge::py::set_shininess ( const float & shininess)

Set the shininess.

Parameters
shininess
Returns
HRESULT

◆ set_shininess() [2/2]

HRESULT TissueForge::py::set_shininess ( const float & shininess,
const unsigned int & srFlag )

Set the shininess of a subrenderer.

Parameters
shininess
srFlag
Returns
HRESULT

◆ set_specular_color() [1/2]

HRESULT TissueForge::py::set_specular_color ( const FVector3 & color)

Set the specular color.

Parameters
color
Returns
HRESULT

◆ set_specular_color() [2/2]

HRESULT TissueForge::py::set_specular_color ( const FVector3 & color,
const unsigned int & srFlag )

Set the specular color of a subrenderer.

Parameters
color
srFlag
Returns
HRESULT

◆ show_discretization()

HRESULT TissueForge::py::show_discretization ( const bool & show)

Set flag to draw/not draw discretization.

Parameters
showflag; true says to show
Returns
HRESULT

◆ showing_discretization()

bool TissueForge::py::showing_discretization ( )

Test whether discretization is current shown.

Returns
true
false

◆ SimulatorPy_init()

PyObject * TissueForge::py::SimulatorPy_init ( PyObject * args,
PyObject * kwargs )

Initialize a simulation in Python.

Parameters
argspositional arguments; first argument is name of simulation (if any)
kwargskeyword arguments; currently supported are
 dim: (3-component list of floats) the dimensions of the spatial domain; default is [10., 10., 10.]

 cutoff: (float) simulation cutoff distance; default is 1.

 cells: (3-component list of ints) the discretization of the spatial domain; default is [4, 4, 4]

 threads: (int) number of threads; default is hardware maximum

 integrator: (int) simulation integrator; default is FORWARD_EULER

 dt: (float) time discretization; default is 0.01

 bc: (int or dict) boundary conditions; default is everywhere periodic

 window_size: (2-component list of ints) size of application window; default is [800, 600]

 seed: (int) seed for pseudo-random number generator

 load_file: (str) path to saved simulation state to initialize

 logger_level: (int) logger level; default is no logging

 clip_planes: (list of tuple of (Vector3f, Vector3f)) list of point-normal pairs of clip planes; default is no planes

◆ toggle_rendering_3d_all()

void TissueForge::py::toggle_rendering_3d_all ( )

Toggle whether bonds, angle and dihedrals are renderered with 3D objects

◆ toggle_rendering_3d_angles()

void TissueForge::py::toggle_rendering_3d_angles ( )

Toggle whether angles are renderered with 3D objects

◆ toggle_rendering_3d_bonds()

void TissueForge::py::toggle_rendering_3d_bonds ( )

Toggle whether bonds are renderered with 3D objects

◆ toggle_rendering_3d_dihedrals()

void TissueForge::py::toggle_rendering_3d_dihedrals ( )

Toggle whether dihedrals are renderered with 3D objects

◆ types()

HRESULT TissueForge::py::types ( Potential * p,
ParticleType * a,
ParticleType * b,
bool bound = 0 )

Bind a potential to a pair of particle types.

Automatically updates when running on a CUDA device.

Parameters
pThe potential
aThe first type
bThe second type
boundFlag signifying whether this potential exclusively operates on particles of different clusters, optional
Returns
HRESULT