Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tf_bindPy.h
Go to the documentation of this file.
1/*******************************************************************************
2 * This file is part of Tissue Forge.
3 * Copyright (c) 2022-2024 T.J. Sego
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 ******************************************************************************/
19
25#ifndef _SOURCE_LANGS_PY_TF_BINDPY_H_
26#define _SOURCE_LANGS_PY_TF_BINDPY_H_
27
28#include "tf_py.h"
30#include "tfForcePy.h"
31#include "tfPotentialPy.h"
32
33#include <tfParticle.h>
34
35
36namespace TissueForge::py {
37
38
47 CPPAPI_FUNC(HRESULT) particles(Potential *p, Particle *a, Particle *b);
48
60 CPPAPI_FUNC(HRESULT) types(Potential *p, ParticleType *a, ParticleType *b, bool bound=false);
61
72
84
92 CPPAPI_FUNC(HRESULT) force(Force *force, ParticleType *a_type);
93
102 CPPAPI_FUNC(HRESULT) force(Force *force, ParticleType *a_type, const std::string& coupling_symbol);
103
116 CPPAPI_FUNC(std::vector<BondHandle>) _bondsPy(
117 Potential* potential,
119 const FloatP_t &cutoff,
120 std::vector<std::pair<ParticleType*, ParticleType*>* > *pairs=NULL,
121 FloatP_t *half_life=NULL,
122 FloatP_t *bond_energy=NULL,
123 uint32_t flags=0
124 );
125
126 CPPAPI_FUNC(std::vector<BondHandle>) _spherePy(
128 Potential *potential,
129 const int &n,
130 FVector3 *center=NULL,
131 const FloatP_t &radius=1.0,
132 FloatP_t *phi0=NULL,
133 FloatP_t *phi1=NULL,
134 ParticleType *type=NULL
135 );
136
137}
138
139// note: bonds and sphere -> _bondsPy and _spherePy
140
141#endif // _SOURCE_LANGS_PY_TF_BINDPY_H_
Tissue Forge Python language support.
Definition tf_bindPy.h:36
HRESULT types(Potential *p, ParticleType *a, ParticleType *b, bool bound=false)
Bind a potential to a pair of particle types.
HRESULT particles(Potential *p, Particle *a, Particle *b)
Bind a potential to a pair of particles.
HRESULT force(Force *force, ParticleType *a_type)
Bind a force to a particle type.
HRESULT boundary_conditions(Potential *p, ParticleType *t)
Bind a potential to a pair of particle type and all boundary conditions.
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.
HRESULT boundary_condition(Potential *p, BoundaryCondition *bc, ParticleType *t)
Bind a potential to a pair of particle type and a boundary conditions.
A condition on a boundary of the universe.
Definition tfBoundaryConditions.h:55
Force is a metatype, in that Tissue Forge has lots of different instances of force functions,...
Definition tfForce.h:69
Definition tfParticle.h:101
A special list with convenience methods for working with sets of particles.
Definition tfParticleList.h:52
Structure containing information on each particle type.
Definition tfParticle.h:768
A Potential object is a compiled interpolation of a given function. The Universe applies potentials t...
Definition tfPotential.h:213
int32_t HRESULT
Definition tf_port.h:255