Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Stomatocyte shape #3730

Merged
merged 2 commits into from
May 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
52 changes: 0 additions & 52 deletions doc/sphinx/constraints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Available shapes are listed below.
- :class:`espressomd.shapes.Slitpore`
- :class:`espressomd.shapes.Sphere`
- :class:`espressomd.shapes.SpheroCylinder`
- :class:`espressomd.shapes.Stomatocyte`
- :class:`espressomd.shapes.Torus`
- :class:`espressomd.shapes.HollowConicalFrustum`
- :class:`espressomd.shapes.Union`
Expand Down Expand Up @@ -334,57 +333,6 @@ the smooth pore openings will be rendered using a sliced torus. You can safely
ignore this visual artifact, it has no impact on the force/energy calculation.


Stomatocyte
"""""""""""

.. note::

Requires ``EXPERIMENTAL_FEATURES``.

:class:`espressomd.shapes.Stomatocyte`

A stomatocyte-shaped boundary surface.
This command should be used with care.
The position can be any point in the simulation box and is set via the (3,) array_like parameter ``center``.
The orientation of the (cylindrically symmetric) stomatocyte is given by an ``axis`` (a (3,) array_like of :obj:`float`),
which points in the direction of the symmetry axis and does not need to be normalized.
Parameters ``outer_radius``, ``inner_radius``, and ``layer_width`` specify the
shape of the stomatocyte. Here inappropriate choices of parameters can yield
undesired results, such as discontinuous shapes or NaN values. Always use
values greater than 1 for ``inner_radius`` to avoid NaN values.
The width ``layer_width`` is used as a scaling parameter.
That is, a stomatocyte given by ``outer_radius:inner_radius:layer_width`` = 7:3:1
is half the size of the stomatocyte given by 7:3:2.

Not all choices of parameters give reasonable values for the shape of the stomatocyte,
but the combination 7:3:1 is a good point to start from when trying to modify the shape.
If you observe jumps in forces for particles inside the stomatocyte cavity,
your parameters are most likely wrong, in which case the OpenGL visualizer
will typically fail to draw dots inside the stomatocyte cavity.


.. figure:: figures/shape-stomatocyte1.png
:alt: Visualization of a constraint with a Stomatocyte shape.
:align: center
:height: 6.00000cm

.. figure:: figures/shape-stomatocyte2.png
:alt: Close-up view of the internal Stomatocyte structure.
:align: center
:height: 6.00000cm


Pictured is an example constraint with a ``Stomatocyte`` shape (with a closeup of the internal structure) created with ::

stomatocyte = Stomatocyte(inner_radius=3,
outer_radius=7,
axis=[1.0, 0.0, 0.0],
center=[25, 25, 25],
layer_width=3,
direction=1)
system.constraints.add(shape=stomatocyte, particle_type=0, penetrable=True)


Slitpore
""""""""

Expand Down
Binary file removed doc/sphinx/figures/shape-stomatocyte1.png
Binary file not shown.
Binary file removed doc/sphinx/figures/shape-stomatocyte2.png
Binary file not shown.
9 changes: 1 addition & 8 deletions samples/visualization_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@
group.add_argument("--wall", action="store_const", dest="shape", const="Wall",
default="Wall")
for shape in ("Sphere", "Ellipsoid", "Cylinder", "SpheroCylinder", "Torus",
"Stomatocyte", "SimplePore", "Slitpore", "HollowConicalFrustum"):
"SimplePore", "Slitpore", "HollowConicalFrustum"):
group.add_argument("--" + shape.lower(), action="store_const",
dest="shape", const=shape)
args = parser.parse_args()


required_features = ["LENNARD_JONES"]
if args.shape == "Stomatocyte":
required_features.append("EXPERIMENTAL_FEATURES")
espressomd.assert_features(required_features)

box_l = 50.0
Expand Down Expand Up @@ -86,11 +84,6 @@
particle_type=0,
penetrable=True)

elif args.shape == "Stomatocyte":
system.constraints.add(shape=espressomd.shapes.Stomatocyte(
inner_radius=3, outer_radius=7, axis=[1.0, 0.0, 0.0], center=[25] * 3,
layer_width=3, direction=1), particle_type=0, penetrable=True)

elif args.shape == "SimplePore":
system.constraints.add(shape=espressomd.shapes.SimplePore(
center=[25, 25, 25], axis=[1, 0, 0], length=15, radius=12.5,
Expand Down
26 changes: 0 additions & 26 deletions src/python/espressomd/shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import collections.abc

from .script_interface import ScriptInterfaceHelper, script_interface_register, ScriptObjectRegistry
from .utils import requires_experimental_features


class Shape:
Expand Down Expand Up @@ -162,31 +161,6 @@ class SpheroCylinder(Shape, ScriptInterfaceHelper):
_so_name = "Shapes::SpheroCylinder"


@script_interface_register
@requires_experimental_features("No test coverage")
class Stomatocyte(Shape, ScriptInterfaceHelper):
"""
Attributes
----------
inner_radius : :obj:`float`
Inner radius of the stomatocyte.
outer_radius : :obj:`float`
Outer radius of the stomatocyte.
axis : (3,) array_like of :obj:`float`
Symmetry axis, prescribing the orientation of the stomatocyte.
center : (3,) array_like of :obj:`float`
Position of the stomatocyte.
layer_width : :obj:`float`
Scaling parameter.
direction : :obj:`int`
Surface orientation, for +1 the normal points
out of the mantel, for -1 it points inward.

"""

_so_name = "Shapes::Stomatocyte"


@script_interface_register
class Torus(Shape, ScriptInterfaceHelper):
"""
Expand Down
63 changes: 0 additions & 63 deletions src/script_interface/shapes/Stomatocyte.hpp

This file was deleted.

3 changes: 0 additions & 3 deletions src/script_interface/shapes/initialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "Slitpore.hpp"
#include "Sphere.hpp"
#include "SpheroCylinder.hpp"
#include "Stomatocyte.hpp"
#include "Torus.hpp"
#include "Union.hpp"
#include "Wall.hpp"
Expand Down Expand Up @@ -55,8 +54,6 @@ void initialize() {
"Shapes::Rhomboid");
ScriptInterface::register_new<ScriptInterface::Shapes::Slitpore>(
"Shapes::Slitpore");
ScriptInterface::register_new<ScriptInterface::Shapes::Stomatocyte>(
"Shapes::Stomatocyte");
ScriptInterface::register_new<ScriptInterface::Shapes::SimplePore>(
"Shapes::SimplePore");
ScriptInterface::register_new<ScriptInterface::Shapes::Torus>(
Expand Down
2 changes: 1 addition & 1 deletion src/shapes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(SOURCE_FILES
src/HollowConicalFrustum.cpp src/Cylinder.cpp src/Ellipsoid.cpp
src/Rhomboid.cpp src/SimplePore.cpp src/Slitpore.cpp src/Sphere.cpp
src/SpheroCylinder.cpp src/Stomatocyte.cpp src/Torus.cpp src/Wall.cpp)
src/SpheroCylinder.cpp src/Torus.cpp src/Wall.cpp)

add_library(shapes SHARED ${SOURCE_FILES})
target_link_libraries(shapes PUBLIC utils PRIVATE Boost::boost cxx_interface)
Expand Down
70 changes: 0 additions & 70 deletions src/shapes/include/shapes/Stomatocyte.hpp

This file was deleted.

Loading