AtomicSystem.add_droplet#

AtomicSystem.add_droplet(blueprint, radius, distance=2.0, vacuum=10.0, axis='z')[source]#

Add a hemispherical liquid droplet on top of this system.

This method creates a hemispherical droplet with the composition defined by the blueprint and places it on top of the current system along the specified axis. The droplet sits on the surface with a flat bottom.

Parameters:
blueprintSolutionBuilder

Solution blueprint defining the droplet composition (density, solutes, etc.).

radiusfloat

Radius of the hemispherical droplet in Ångströms.

distancefloat, default=2.0

Distance between the current system surface and the droplet in Ångströms.

vacuumfloat, default=10.0

Vacuum space added above the droplet in Ångströms.

axisstr, default=’z’

Axis along which the droplet sits (‘x’, ‘y’, or ‘z’).

Returns:
Self

The updated system with the droplet added.

Examples

>>> from cemd import AtomicSystem
>>> from cemd.build import SolutionBuilder
>>>
>>> surface = AtomicSystem.from_file("surface.lmp")
>>> blueprint = SolutionBuilder(
...     density=1.0,
...     molarities={'NaCl': 0.1}
... )
>>>
>>> # Add a 15 Å radius water droplet on the surface
>>> system = surface.add_droplet(blueprint, radius=15.0, distance=2.0)