Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tf_bind.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
24
25#pragma once
26#ifndef _SOURCE_TF_BIND_H_
27#define _SOURCE_TF_BIND_H_
28
30#include <tfForce.h>
31#include <tfPotential.h>
32#include <tfBond.h>
33
34#include <utility>
35
36
37namespace TissueForge::bind {
38
39
48 CPPAPI_FUNC(HRESULT) particles(Potential *p, Particle *a, Particle *b);
49
61 CPPAPI_FUNC(HRESULT) types(Potential *p, ParticleType *a, ParticleType *b, bool bound=false);
62
73
85
93 CPPAPI_FUNC(HRESULT) force(Force *force, ParticleType *a_type);
94
103 CPPAPI_FUNC(HRESULT) force(Force *force, ParticleType *a_type, const std::string& coupling_symbol);
104
118 CPPAPI_FUNC(HRESULT) bonds(
119 Potential* potential,
121 const FloatP_t &cutoff,
122 std::vector<std::pair<ParticleType*, ParticleType*>* > *pairs=NULL,
123 const FloatP_t &half_life=std::numeric_limits<FloatP_t>::max(),
124 const FloatP_t &bond_energy=std::numeric_limits<FloatP_t>::max(),
125 uint32_t flags=0,
126 std::vector<BondHandle> *out=NULL
127 );
128
129 CPPAPI_FUNC(HRESULT) sphere(
130 Potential *potential,
131 const int &n,
132 FVector3 *center=NULL,
133 const FloatP_t &radius=1.0,
134 std::pair<FloatP_t, FloatP_t> *phi=NULL,
135 ParticleType *type=NULL,
136 ParticleList *partList=NULL,
137 std::vector<BondHandle> *bondList=NULL
138 );
139
140};
141
142#endif // _SOURCE_TF_BIND_H_
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
HRESULT force(Force *force, ParticleType *a_type)
Bind a force to a particle type.
HRESULT particles(Potential *p, Particle *a, Particle *b)
Bind a potential to a pair of particles.
HRESULT boundaryConditions(Potential *p, ParticleType *t)
Bind a potential to a pair of particle type and all boundary conditions.
HRESULT bonds(Potential *potential, ParticleList &particles, const FloatP_t &cutoff, std::vector< std::pair< ParticleType *, ParticleType * > * > *pairs=NULL, const FloatP_t &half_life=std::numeric_limits< FloatP_t >::max(), const FloatP_t &bond_energy=std::numeric_limits< FloatP_t >::max(), uint32_t flags=0, std::vector< BondHandle > *out=NULL)
Create bonds for a set of pairs of particles.
HRESULT boundaryCondition(Potential *p, BoundaryCondition *bc, ParticleType *t)
Bind a potential to a pair of particle type and a boundary conditions.
HRESULT types(Potential *p, ParticleType *a, ParticleType *b, bool bound=false)
Bind a potential to a pair of particle types.
int32_t HRESULT
Definition tf_port.h:255