This adds two options for solvent evaporation simulations.
Accelerate drying by deleting random solvent molecules from within a slab below the surface skin (assumes film grows from the vacuum interface).
Allow smaller initial configurations by inserting slabs of solution whenever the bottom of the surface skin drops below a specified height. Inserted slab can come from either own geometry, or from an auxiliary system.
Also implements handling of multiple solvent molecule types (resolving #3 )
For speed, density profile and layer height calculation are now cached, as is the auxiliary system for insertion, and valid residues within that system. These are additions to the original insertion code, so they may need more extensive testing, but they appear to be working correctly in the short tests I've run.
The inserted slab generally won't have 0 CoM momentum, so it can cause the film to drift. This will be removed by gromacs later, but means that the substrate could cross the lower z boundary, and therefore this must be checked when looking for highest atoms and adjusting the box. Ideally we could calculate the change in CoM momentum due to the insertion and correct for it (subtract the difference from the velocities of atoms in the inserted layer), but we're not currently loading atomic masses so doing that would require more overhead.
Loops to calculate valid residues for insertion are written in a way that should be easy to parallelise later with something like a multiprocessing map if it ends up being necessary. This may not actually be faster though - I vaguely remember trying both in the original code and settling on itertools.imap(), which is equivalent to python 3 map().
This adds two options for solvent evaporation simulations.
Also implements handling of multiple solvent molecule types (resolving #3 )
Implementation Notes
itertools.imap()
, which is equivalent to python 3map()
.