Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1730 commits
Select commit Hold shift + click to select a range
0328aa3
More debug output
Dec 21, 2012
6fc70f5
And even more
Dec 21, 2012
34439e6
Convert a boost-python allocated list to Python list instead of bool
Dec 21, 2012
a5adc8c
Define destructor for pyarray_backed_allocator for completeness
Dec 21, 2012
ecd1c1f
Cleanup
Dec 21, 2012
7daa044
Treat zero-rates properly in load routine
Dec 21, 2012
726c263
Further cleanup
Dec 21, 2012
4de4355
Merge pull request #104 from YetAnotherTomek/zero-rate-issue
YetAnotherTomek Dec 21, 2012
c0a5a99
Increase single shell factor to 3.5 so that it is >= 2* multi shell f…
Dec 21, 2012
c522c23
Another revision of the rootfinding in EDGE_HITS_EDGE cylinder scaling
Jan 15, 2013
bb04e1b
Cleanup
Jan 15, 2013
4dfe420
Tolerate a certain overlap with overlap_tolerance = TOLERANCE*shell_size
Jan 15, 2013
f55fedb
Warn when continuing with overlap within overlap_tolerance
Jan 15, 2013
51c51f5
Fix transition pair shell construction problem
Jan 15, 2013
57a2983
One more warn statement
Jan 15, 2013
ba6d959
Basic code structure for overlap remover routine
Jan 15, 2013
5e98365
Continue
Jan 16, 2013
9a258d4
Merge commit 'upstream/develop' into develop
Jan 16, 2013
c959a38
Some cleanup in shells.py
Jan 16, 2013
208c7e9
Merge pull request #105 from YetAnotherTomek/develop
YetAnotherTomek Jan 16, 2013
facc6bd
Reject single reactions in which a product crosses a plane
Feb 13, 2013
377e5fe
Same thing for the BD mode, slightly more effort required
Feb 13, 2013
dea0c2e
Rename crossing_comparison_vector -> side_comparison_vector
Feb 14, 2013
c6a08de
Remove comment that is not true any more
Feb 14, 2013
d644d1a
Merge commit 'upstream/develop' into develop
Mar 21, 2013
d8ff5a5
Merge pull request #106 from YetAnotherTomek/develop
YetAnotherTomek Aug 16, 2013
c284444
Basic code structure for overlap remover routine
Jan 15, 2013
5ccc63d
Continue
Jan 16, 2013
2387aed
Merge commit 'origin/overlap_remover' into overlap_remover
Aug 19, 2013
da1d578
WIP + fix weird merge conflict
Aug 19, 2013
6b7fa9f
Finish first version of a working overlap remover
Aug 19, 2013
bb8207d
Introduce a function to default-connect one plane in periodic BCs
Aug 19, 2013
b1d9fb1
Use do_back_transform correctly
Aug 19, 2013
4e4c94f
Include overlap error into print_report
Aug 19, 2013
b9cfc31
Reconstruct periodic connection correctly upon reloading via the
Aug 19, 2013
f5b5caf
Fix an object creation loop that caused huge memory leaks
Aug 22, 2013
8976f07
WIP - some debug statements
Aug 22, 2013
58c795d
Merge branch 'overlap_remover_fix' into overlap_remover
Aug 22, 2013
b96d832
This is not the right way to treat it...
Aug 22, 2013
537f676
further WIP
Aug 22, 2013
fe16a8d
Only try to establish connections at loading if such
Aug 23, 2013
f2d247d
Avoid applying boundary cond. to self-connected planes + warn
Aug 23, 2013
2ffcd07
WIP
Aug 23, 2013
608ac93
Some cleanup
Aug 23, 2013
7f3b20c
Mark a problematic feature in StructureContainer.hpp
Aug 23, 2013
37feaa0
Temporarily remove debug statement
Aug 26, 2013
df83ed2
Forgot an important any() in if-statement
Aug 27, 2013
5447872
Merge commit 'upstream/develop' into overlap_remover
Aug 30, 2013
21e6381
Set overlap removing to False as default
Aug 30, 2013
048824e
Simple on/off functions for overlap remover
Aug 30, 2013
0f4ba5f
Merge branch 'overlap_remover' into develop
Aug 30, 2013
189c365
Compactify fire_single_reactino() a bit
Aug 30, 2013
69d0c17
Allow user to specify custom parent structures for caps
Aug 30, 2013
36fc72b
Put dissociating particle on parent structure, not automatically
Aug 30, 2013
784e11b
Return structure IDs when creating a box + feed in IDs for
Sep 2, 2013
011f5f6
Revise naming convention for planes in box object
Sep 2, 2013
5b7cfa9
Small fix
Sep 2, 2013
71cf013
Allow user to specify more details of the rod
Sep 2, 2013
8d8c15e
Introduce Cylinder to Plane Interaction Domain
Sep 2, 2013
e88113b
Some renaming
Sep 3, 2013
f835cc3
Introduce a new ('fake') interaction domain that encloses a particle
Sep 3, 2013
f945e50
Just some useful debugging statements
Sep 3, 2013
750c732
Forgot burst event type in new single class
Sep 4, 2013
50015f1
Just a memo
Sep 4, 2013
9dfdea3
Basic treatment for the "Interface Pair", i.e. a PlanarSurfacePair
Sep 4, 2013
a547e4f
Forgot to rename box planes in connecting routine
Sep 4, 2013
1f4eb3f
Fix ignorelists in overlap checking
Sep 5, 2013
c77178b
Basic implementation of PlanarSurfaceCylindricalSurfaceInteraction (t…
Sep 5, 2013
f05fd4a
Basic implementation of PlanarSurfaceCylindricalSurfaceInteraction (d…
Sep 5, 2013
5a655be
Small fix
Sep 5, 2013
612fd21
Always return next-event time = inf for SINGLE_ESCAPE in
Sep 6, 2013
ce2d809
Fix domain construction gearbox taking into account the new domain
Sep 6, 2013
6a96f58
Introduce a distinction between target and product structure in
Sep 6, 2013
eefc07a
Cleanup
Sep 6, 2013
2c6a14a
Check whether static particle is below cylinder in PlanarSurfacePair …
Sep 13, 2013
cba2a4b
Some cleanup
Sep 13, 2013
4523a5d
Rename 'testMixedPair1DCap' into 'testMixedPair1DStatic' to generalize
Sep 13, 2013
91e5443
Same renaming for the associated pair domain
Sep 13, 2013
64b262d
One more important check
Sep 13, 2013
45ecf3d
Convert assert statement to exception that can be handled
Sep 13, 2013
412d1a1
Generalize construction of MixedPair1DCap to MixedPair1DStatic, i.e.
Sep 13, 2013
2fdce3c
All interactions need property self.product_structure
Sep 13, 2013
ca82a5c
Not selfish enough...
Sep 13, 2013
7c1655e
Fix min-size of plane-cylinder interface shell
Sep 16, 2013
1d5b3c8
WIP on newBDpropagator
Sep 16, 2013
bd35f3b
Better treatment of applying the right rate-modifier function when
Sep 17, 2013
30b6816
Treat case D_2D=0 in MixedPair2D3D
Sep 17, 2013
b848ac0
Forgot to save and re-load decay reaction rules in load/save system
Sep 17, 2013
7192bfd
Some important fixes
Sep 18, 2013
e7491c7
Tentative version of Cylinder->Plane Interaction that places the
Sep 18, 2013
9857e89
Some informative commenting
Sep 18, 2013
2f1b01a
Correctly handle Cylinder->Plane transfer in BD mode structure functions
Sep 18, 2013
a10e784
Small fix
Sep 18, 2013
2fa6e39
Update shell overlap ignore lists
Sep 18, 2013
3a94d50
Make Cyl.SurfacePlanarSurfaceInterfaceSingle an interaction from plan…
Sep 18, 2013
8988f78
New function that finds the closest structure form a point +
Sep 19, 2013
7aeec0a
Some consistent renaming and cleanup
Sep 19, 2013
95bbb3c
Small fixes
Sep 19, 2013
a051c8f
Use new search function to find daughter disk
Sep 19, 2013
9549150
Make sure get_neighbor_surfaces does correctly filter out the
Sep 19, 2013
d83d4bc
Ignore closest cylinder and check whether it is located correctly
Sep 19, 2013
5f168e1
Fix ignore lists in check_domain()
Sep 19, 2013
3258cff
Clean up single_reaction behavior for Cyl.SurfacePlanarSurfaceInterfa…
Sep 19, 2013
d74bd79
Put MixedPair1DStatic on correct ignore list in check_domain()
Sep 19, 2013
0fec13f
Revise domains for Cyl.Surface->PlanarSurface transfer
Sep 19, 2013
b599b9b
Some cleanup of deprecated stuff
Sep 19, 2013
d959184
Fixes to make MixedPair1DStatic work with the new interface situation
Sep 19, 2013
059cb80
PlanarSurfaceCylindricalSurfaceInteraction -> PlanarSurfaceDiskSurfac…
Sep 19, 2013
c71422f
New testShell type MixedPair2DStatictestShell, which is for making a
Sep 19, 2013
01d7ce8
Minor fixes
Sep 19, 2013
57c609b
Clean up test pair class definitions a bit
Sep 20, 2013
d018b65
Change order of initialization in MixedPair1DStatictestShell
Sep 20, 2013
fe9fa13
Same class reorganization for the pair classes
Sep 20, 2013
c841d02
Extend Disk.project_point() method to the case in which the position
Sep 20, 2013
40ea20a
Minor fixes
Sep 20, 2013
c115d7b
Fix structure functions for Plane->Disk case
Sep 20, 2013
85d7f0f
Useful comments
Sep 24, 2013
6a3f533
Fixes in fire_single_reaction() and make_new_domain()
Sep 24, 2013
489d3a0
New exception 'ShellUpdateError' to be able to catch it specifically
Sep 25, 2013
56c1fbc
Only add new single to the scheduler after all checks have been made
Sep 25, 2013
c587720
Replacement '!= None' -> 'is not None'
Sep 25, 2013
875e191
New method dof() which returns degrees of freedom for particle
Sep 26, 2013
8b931fc
Make dof() function accessible to Structure etc.
Sep 26, 2013
f6db75a
New surface overlap checker method that allows for two ignored struct…
Sep 26, 2013
4e300b3
Ignore reactant structures when placing product in BD mode
Sep 26, 2013
7d70d7d
Some cleanup of stuff that did not work
Sep 26, 2013
adc21ff
New function all_feq to check whether all entries of a difference
Sep 30, 2013
3803c54
Replace '==' by feq() or feq_all() in assert statements
Sep 30, 2013
20a54e1
Check whether particles are immobile and there is nothing to do
Oct 1, 2013
8ac12d6
Fix unbinding Disk->Plane in BD mode
Oct 2, 2013
f942817
Introduce MINIMAL_SEPARATION_FACTOR into BD mode (via Defs.hpp)
Oct 2, 2013
48a1a85
Ignore structure overlap checks for static particles in BD mode
Oct 2, 2013
a5ee314
Minor change
Oct 2, 2013
e09985f
More debug info for multis
Oct 3, 2013
d784ba7
Ignore surface overlaps for all immobile particles in Multis
Oct 3, 2013
e80bc38
Activate hardcore BD limit and overlap remover
Oct 3, 2013
48bbcbd
Remove costly debug statement
Oct 3, 2013
36f0913
Allow user to specify time delay when reloading saved state
Oct 11, 2013
032c116
Some fixes in shellmaking for cylindrical domains
Oct 14, 2013
342f774
Cleanup
Oct 14, 2013
5afeb1f
Weaken an assert condition in pair.py to allow for formation of
Oct 17, 2013
1e861a2
Equalize a_R to zero if it is very close to zero
Oct 17, 2013
71132cd
Allow user to connect edges of parallel structures and treat transitions
Oct 17, 2013
b4e9275
Some comments and clarifying renamings in distance measurement functions
Oct 18, 2013
3f92a5e
Change logger name
Oct 18, 2013
80ae624
Check whether particle is in bounds before applying BCs in
Oct 18, 2013
d6b1598
small fix
Oct 18, 2013
fb8b263
Two changes to egfrd.py
Oct 21, 2013
7ca4c99
Cleanup
Oct 21, 2013
db21e88
Improve some simulator consistency checks + increase
Nov 15, 2013
7133304
Examaple script for simple reaction in 2D
Apr 11, 2014
789cd26
Include utils.cpp into StructureFunctions.hpp to fix some
Jun 3, 2014
2afbe8e
Fixes modern tools/compiler
Seynen Oct 21, 2014
d0e8ab5
Fix Python2.7 logging, close issue gfrd/egfrd#83 and #84
Seynen Oct 21, 2014
bcace5f
Fix python logger, code from motiyoshi was not correct for old_fashio…
Seynen Oct 22, 2014
a82f257
Cleanup of makefile (removed duplicate comamndline options).
Seynen Oct 23, 2014
1950ccf
Updated INSTALL text.
Seynen Oct 23, 2014
9a19b8a
Update Autotools build configuration
Seynen Oct 27, 2014
a0b26a4
The macro seems not to be too widespread (Ubuntu < 14).
Seynen Oct 27, 2014
d0514f3
Added sample unit test files
Dec 1, 2014
54751c8
Merge pull request #107 from Seynen/develop
YetAnotherTomek Dec 3, 2014
60f7614
Minor cleanup in egfrd.py
Dec 3, 2014
064493f
Replace an assert by raise exception in shells.py
Dec 3, 2014
f74d353
Fix a typo
Dec 3, 2014
163d32e
Merge remote-tracking branch 'upstream/develop' into develop
Dec 3, 2014
488e83b
Merge pull request #108 from YetAnotherTomek/develop
YetAnotherTomek Dec 3, 2014
9c981f6
Removed compiler flag 'no-unused-local-typedefs'.
Seynen Dec 5, 2014
1f7bccb
Code cleanup, removed 'unused' types/variables/defines. Less warnings…
Seynen Dec 8, 2014
02963e8
Fixed 'narrowing'-warning.
Seynen Dec 9, 2014
99db909
Merge pull request #109 from Seynen/develop
YetAnotherTomek Dec 12, 2014
0d07d5d
WIP/draft example making use of all features (1D+2D+3D)
YetAnotherTomek Mar 24, 2015
f1ac825
Merge remote-tracking branch 'upstream/develop' into develop
YetAnotherTomek Mar 24, 2015
c434078
Updated comments in the example script
YetAnotherTomek Mar 25, 2015
f8bd09e
Polish the example file
YetAnotherTomek Mar 25, 2015
4c308b4
An early version for a new VPython based visualiser (TIRViE)
YetAnotherTomek Aug 26, 2016
441729b
Add a new flag to DiskStructure to reg. movement of dissoc. particles
YetAnotherTomek Aug 26, 2016
b4b5b3f
Some meaningful renaming
YetAnotherTomek Aug 26, 2016
79f19cf
Allow for different ways of dissociation from DiskSurface (egfrd.py)
YetAnotherTomek Aug 26, 2016
445c864
Include new DiskSurface features into load/save system
YetAnotherTomek Aug 26, 2016
d8d892d
Small correction in CylindricalSurfaceCapInteractionShell
YetAnotherTomek Aug 26, 2016
008d563
Fix different unbinding modes for Disk in BD mode
YetAnotherTomek Aug 29, 2016
0884249
Prevent forming interaction domains when distance to surface is zero
YetAnotherTomek Aug 29, 2016
6c2ef05
Add a screen output retarding feature to TIRViE visualizer
YetAnotherTomek Aug 29, 2016
a106e85
Add 's' to time string in TIRViE
YetAnotherTomek Aug 29, 2016
a4f7df7
Fix color dictionary management for Multis in TIRViE
YetAnotherTomek Aug 29, 2016
0f19f31
Small fix to event-type statistics
YetAnotherTomek Aug 30, 2016
0d912d9
Some commenting in TIRViE
YetAnotherTomek Aug 30, 2016
ace5afb
Some renaming that seems to make sense ("cap" -> "disk")
YetAnotherTomek Sep 2, 2016
1c12393
try/except for finding the closest structure of a certain type
YetAnotherTomek Sep 2, 2016
764e858
Move info printing in step() to prevent SEGFAULTS
YetAnotherTomek Sep 6, 2016
0115d04
exit() function + aliases for TIRViE
YetAnotherTomek Sep 7, 2016
aa6169b
Make wireframe mode for simulation box default in TIRViE
YetAnotherTomek Sep 7, 2016
e1cc0b9
Rename ROD_RADIUS_FACTOR -> CYL_SURF_RADIUS_FACTOR and reset default …
YetAnotherTomek Sep 7, 2016
a97044f
Make radius size factor a(n) (optional) parameter to TIRViE
YetAnotherTomek Sep 7, 2016
1554afe
Allow for independent specification of particle and cyl. surf. radius…
YetAnotherTomek Sep 7, 2016
afb98f6
Improvements to Tomek's helix eyecandy
YetAnotherTomek Sep 7, 2016
01900ee
Aliases to get_next_time() and some exception message cleanup
YetAnotherTomek Sep 7, 2016
197ebd6
Improved clear_scene() method in TIRViE
YetAnotherTomek Sep 7, 2016
3f7be7b
More changes to clear_scene(), treating frame deletion more carfully
YetAnotherTomek Sep 7, 2016
04b8e89
Another flag for DiskSurface to distinguish cap from sink
YetAnotherTomek Sep 8, 2016
7cc8d69
Some renaming ("cap" -> "barrier") and fixes to barrier/sink distinction
YetAnotherTomek Sep 8, 2016
7d9d1be
More detailed error output in stop() method
YetAnotherTomek Sep 8, 2016
b6f15b7
Fix creation of 'CylindricalSurfacePlanarSurfaceIntermediateSingletes…
YetAnotherTomek Oct 31, 2016
3c52b1d
Make DiskSurfaceSingle and rod-plane interface domains ignore other d…
YetAnotherTomek Oct 31, 2016
b0c4305
More fixes to ignore other disks when forming cyl./plane interface do…
YetAnotherTomek Oct 31, 2016
3518501
Stub for a PlanarSurfaceCylindricalSurfaceInteraction test shell
YetAnotherTomek Oct 31, 2016
6765d94
Continue PlanarSurfaceCyl.SurfaceInteraction test shell
YetAnotherTomek Oct 31, 2016
37e330b
Some consistent renaming and useful comments for CylindricalSurfacePl…
YetAnotherTomek Nov 2, 2016
e2d5daf
find_daughter_disk() routine in PlanarSurfaceCylindricalSurfaceIntera…
YetAnotherTomek Nov 2, 2016
2863b2a
Revise constructor of PlanarSurfaceCylindricalSurfaceInteractiontestS…
YetAnotherTomek Nov 2, 2016
85a83ea
Some fixes to shellscaling routines and ignore list
YetAnotherTomek Nov 2, 2016
10b0c47
Make the main routine use the new test shell and domain
YetAnotherTomek Nov 2, 2016
d9ddbfb
Preliminary version of PlanarSurfaceCylindricalSurfaceInteraction domain
YetAnotherTomek Nov 2, 2016
5441194
Make PlanarSurfaceDiskSurfaceInterface a special case of PlanarSurfac…
YetAnotherTomek Nov 2, 2016
465bf6e
More info output for interactions
YetAnotherTomek Nov 4, 2016
04e6e41
More informative output during interactions/overlaps in newBDpropagator
YetAnotherTomek Nov 4, 2016
cd56ed2
Yet more informative debug output in newBDpropagator
YetAnotherTomek Nov 7, 2016
0c11931
WIP: A new hashtable allowing to selectively deactivate constr. of do…
YetAnotherTomek Nov 8, 2016
6ecee66
Namefix
YetAnotherTomek Nov 8, 2016
cc40c21
Allow selective deactivation of domain creation also for Singles
YetAnotherTomek Nov 8, 2016
a247a4a
Allow selective deactivation of formation of Pair domain classes
YetAnotherTomek Nov 8, 2016
01a8b1f
Increase SAFETY to 1.03 (from 1.01)
YetAnotherTomek Nov 8, 2016
11d1f8e
Slightly change order in "domain creation hashmap"
YetAnotherTomek Nov 8, 2016
1418a32
Some commenting
YetAnotherTomek Nov 8, 2016
6ccd935
More informative output in newBDpropagator.hpp
YetAnotherTomek Nov 8, 2016
2330b50
Allow for transitions Plane->Cylinder in BD mode
YetAnotherTomek Nov 8, 2016
008754f
Fix unbinding behavior for Cyl.->Plane interaction in BD mode
YetAnotherTomek Nov 8, 2016
97b3703
Cyl.SurfacePlanarSurfaceInteractiontestShell can be returned w/o daug…
YetAnotherTomek Nov 8, 2016
200c4f9
Changes to Cyl.SurfacePlanarSurfaceInteraction domain in single.py
YetAnotherTomek Nov 9, 2016
d381951
Some debugging and balancing of new features (WIP)
YetAnotherTomek Nov 9, 2016
fb87d74
Further fixes to the newly implemented Cyl./Plane interaction domains
YetAnotherTomek Nov 14, 2016
782875d
Some better info output upon placing particles
YetAnotherTomek Nov 14, 2016
bb7b34c
Fixes to failing typecast in binding of particle model
YetAnotherTomek Mar 3, 2017
17a2aa9
Add CPP-flag '-std=gnu++98' as default for compilation
YetAnotherTomek Mar 6, 2017
f3ae176
Add a method to quickly remove all particles from the simulator
YetAnotherTomek Mar 7, 2017
28d1842
Fix coordinate mapping in TIRViE visualizer
YetAnotherTomek Mar 7, 2017
a0be9e3
Allow to selectively remove particles of a certain species
YetAnotherTomek Mar 8, 2017
cf3487e
Methods for (un)setting the BD_ONLY_FLAG in eGFRD simulator
YetAnotherTomek Mar 8, 2017
4e50508
Small fix
YetAnotherTomek Mar 30, 2017
987bb3d
Fix for GCC 4.9 and above (template arg deduction error in range_from…
Seynen Jun 7, 2017
d8954a5
Small changes to allow for correct resetting of BD_ONLY_FLAG upon rel…
Jun 8, 2017
69b84a4
Updated README and INSTALL files
YetAnotherTomek Aug 29, 2017
5bda266
Merge remote-tracking branch 'central/develop' into merge_central
YetAnotherTomek Aug 29, 2017
cd9abca
More updates to README file
YetAnotherTomek Aug 29, 2017
01aea2d
Merge pull request #113 from YetAnotherTomek/develop
YetAnotherTomek Aug 29, 2017
cd866f2
Fix references in README
YetAnotherTomek Aug 31, 2017
d28e28f
Merge pull request #114 from YetAnotherTomek/develop
YetAnotherTomek Aug 31, 2017
d1b2b24
Some tweaks to TIRViE visualizer
YetAnotherTomek Oct 17, 2017
173ecfe
Fixes to list of included boost files, to improve compilation behavior
YetAnotherTomek Oct 17, 2017
aba7b0b
Merge pull request #115 from YetAnotherTomek/develop
YetAnotherTomek Dec 4, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 72 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,41 +1,80 @@
*~
*.a
# Files that should be ignored by git for tracking
# For explanation see the gitignore man page
#
# ignore all compiled python files
*.pyc
*.pyo
# ignore all compiled C++ libraries and object files
*.lo
*.la
*.lai
*.lo
*.loT
*.o
*.so
*.pyo
*.pyc
*.Plo
*.Po
*.o
*.a
*.loT
# ignore generated Bessel tables
/CylindricalBesselTable.hpp
/SphericalBesselTable.hpp

# ignore files generated by pdflatex
*.aux
*.log
*.pdf
*.toc

# ignore files generated by other tools such as pygmentize
*.png

# ignore data files generated by the examples
*.out

# ignore Makefiles.in generated by automake and Makefiles generated by configure
Makefile.in
/Makefile
/doc/Makefile
/binding/Makefile
/samples/benchmark/Makefile
/test/Makefile

# all kinds of configuration files follow now
# ignore files generated by configure
/config.h
/config.log
/config.status
/stamp-h1
# ignore scripts generated by configure (I think)
/config.guess
/config.sub
/libtool
/ltmain.sh
# ignore files generated by autoconf
/configure
/depcomp
/missing
/py-compile
/install-sh
/m4/libtool.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/autom4te.cache/
# ignore files generated by autoheader
/config.h.in
# ignore files generated by aclocal
/aclocal.m4

# ignore some other files/directories
*~
*.orig
*.rej
.libs
.deps
.*_history*
m4
Makefile
Makefile.in
depcomp
config.h
config.h.in
ltmain.sh
.deps
config.status
config.h.in
libtool
py-compile
configure
config.log
config.guess
config.sub
stamp-h1
autom4te.cache
SphericalBesselTable.hpp
CylindricalBesselTable.hpp
missing
aclocal.m4
install-sh

# Note sure why these are excluded (added by Morioshi)
test/World_test
test/array_helper_test
test/filters_test
Expand All @@ -55,5 +94,6 @@ test/linear_algebra_test
test/pointer_as_ref_test
test/EGFRDSimulator_test
test/geometry_test
samples/benchmark/hardbody
samples/*/*.out

# ignore vi swp files open while editting
*.swp
46 changes: 30 additions & 16 deletions BDPropagator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <boost/range/const_iterator.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include "Defs.hpp"
#include "generator.hpp"
#include "exceptions.hpp"
Expand Down Expand Up @@ -97,15 +98,15 @@ class BDPropagator
if (species.D() == 0.)
return true;

position_type const displacement(drawR_free(species));
position_type const displacement(drawR_free(pp));
position_type const new_pos(
tx_.apply_boundary(
add(pp.second.position(), displacement)));

particle_id_pair particle_to_update(
pp.first, particle_type(species.id(),
particle_shape_type(new_pos, species.radius()),
species.D()));
pp.second.structure_id(), species.D()));
boost::scoped_ptr<particle_id_pair_and_distance_list> overlapped(
tx_.check_overlap(particle_to_update.second.shape(),
particle_to_update.first));
Expand Down Expand Up @@ -158,9 +159,10 @@ class BDPropagator
}

private:
position_type drawR_free(species_type const& species)
position_type drawR_free(particle_id_pair const& pp)
{
return tx_.get_structure(species.structure_id())->bd_displacement(std::sqrt(2.0 * species.D() * dt_), rng_);
species_type const species(tx_.get_species( pp.second.sid()) );
return tx_.get_structure(pp.second.structure_id())->bd_displacement(species.v() * dt_, std::sqrt(2.0 * species.D() * dt_), rng_);
}

bool attempt_reaction(particle_id_pair const& pp)
Expand Down Expand Up @@ -196,6 +198,7 @@ class BDPropagator
pp.first, particle_type(products[0],
particle_shape_type(pp.second.position(),
s0.radius()),
pp.second.structure_id(),
s0.D()));
boost::scoped_ptr<particle_id_pair_and_distance_list> overlapped(tx_.check_overlap(new_p.second.shape(), new_p.first));
if (overlapped && overlapped->size() > 0)
Expand Down Expand Up @@ -238,14 +241,17 @@ class BDPropagator
throw propagation_error("no space");
}

const Real rnd(rng_());
length_type pair_distance(
drawR_gbd(rnd, r01, dt_, D01));
const position_type m(random_unit_vector() * pair_distance);
boost::shared_ptr<structure_type> pp_structure(
tx_.get_structure( pp.second.structure_id()) );

position_type m( pp_structure->
dissociation_vector( rng_, r01, dt_, D01, s0.v() - s1.v() ) );

np0 = tx_.apply_boundary(pp.second.position()
+ m * (s0.D() / D01));
- m * (s0.D() / D01));
np1 = tx_.apply_boundary(pp.second.position()
- m * (s1.D() / D01));
+ m * (s1.D() / D01));

boost::scoped_ptr<particle_id_pair_and_distance_list> overlapped_s0(
tx_.check_overlap(
particle_shape_type(np0, s0.radius()),
Expand All @@ -268,8 +274,8 @@ class BDPropagator

tx_.remove_particle(pp.first);
const particle_id_pair
npp0(tx_.new_particle(s0.id(), np0)),
npp1(tx_.new_particle(s1.id(), np1));
npp0(tx_.new_particle(s0.id(), pp.second.structure_id(), np0)),
npp1(tx_.new_particle(s1.id(), pp.second.structure_id(), np1));

if (rrec_)
{
Expand Down Expand Up @@ -299,8 +305,8 @@ class BDPropagator
}

const species_type s0(tx_.get_species(pp0.second.sid())),
s1(tx_.get_species(pp1.second.sid()));
const length_type r01(s0.radius() + s1.radius());
s1(tx_.get_species(pp1.second.sid()));
length_type r01(s0.radius() + s1.radius());

const Real rnd(rng_());
Real prob = 0;
Expand All @@ -309,7 +315,12 @@ class BDPropagator
i(boost::begin(rules)), e(boost::end(rules)); i != e; ++i)
{
reaction_rule_type const& r(*i);
const Real p(r.k() * dt_ / ((I_bd(r01, dt_, s0.D()) + I_bd(r01, dt_, s1.D())) * 4.0 * M_PI));

boost::shared_ptr<structure_type> pp_structure(
tx_.get_structure( pp0.second.structure_id()) ); // we assume that both particles live on the same surface

const Real p(pp_structure->p_acceptance( r.k(), dt_, r01, subtract( pp1.second.position(),
pp0.second.position() ), s0.D(), s1.D(), s0.v(), s1.v() ));
BOOST_ASSERT(p >= 0.);
prob += p;
if (prob >= 1.)
Expand All @@ -330,6 +341,7 @@ class BDPropagator
switch (::size(products))
{
case 1:
// If the number or product of the reaction is one.
{
const species_id_type product(products[0]);
const species_type sp(tx_.get_species(product));
Expand All @@ -342,6 +354,7 @@ class BDPropagator
pp1.second.position(),
pp0.second.position()), s0.D())),
(s0.D() + s1.D()))));

boost::scoped_ptr<particle_id_pair_and_distance_list> overlapped(
tx_.check_overlap(particle_shape_type(new_pos, sp.radius()),
pp0.first, pp1.first));
Expand All @@ -362,7 +375,7 @@ class BDPropagator

remove_particle(pp0.first);
remove_particle(pp1.first);
particle_id_pair npp(tx_.new_particle(product, new_pos));
particle_id_pair npp(tx_.new_particle(product, pp0.second.structure_id(), new_pos));
if (rrec_)
{
(*rrec_)(
Expand All @@ -372,6 +385,7 @@ class BDPropagator
break;
}
case 0:
// If the two particles annihilate eachother. Just remove the particles.
remove_particle(pp0.first);
remove_particle(pp1.first);
break;
Expand Down
Loading