SolventSurface

class SolventSurface(configuration)

Class for storing the configuration and solvent surface for later visualization.

Parameters:

configuration (MoleculeConfiguration) – Configuration with a calculator that has a solvent surface.

configuration()
Returns:

The configuration associated with the solvent surface.

Return type:

MoleculeConfiguration | BulkConfiguration | SurfaceConfiguration

evaluate()
Returns:

The solvent surface

Return type:

CosmoSolventSurface

metatext()
Returns:

The metatext of the object or None if no metatext is present.

Return type:

str | None

nlinfo()
Returns:

Information about the calculated solvent surface.

Return type:

dict

nlprint(stream=None)

Print a string containing an ASCII table useful for plotting the AnalysisSpin object.

Parameters:

stream (python stream) – The stream the table should be written to.
Default: NLPrintLogger()

setMetatext(metatext)

Set a given metatext string on the object.

Parameters:

metatext (str | None) – The metatext string that should be set. A value of “None” can be given to remove the current metatext.

surface()
Returns:

The solvent surface

Return type:

CosmoSolventSurface

uniqueString()

Return a unique string representing the state of the object.

Usage Examples

Get a COSMO solvent surface for a methanol molecule.

# Set the LCAO Calculator
solvation_parameters = CosmoSolvationParameters()
calculator = LCAOCalculator(
    solvation_parameters=solvation_parameters
)
configuration.setCalculator(calculator)
configuration.update()
nlsave('methanol_cosmo_surface.hdf5', configuration)


# Get the COSMO solvent surface
solvent_surface = SolventSurface(
    configuration=configuration
)
nlsave('methanol_cosmo_surface.hdf5', solvent_surface)

cosmo_surface = solvent_surface.evaluate()

methanol_solvent_surface.py

Once the SolventSurface is calculated, it can be opened in the Viewer to display the solvent surface.

../../../_images/methanol_visualization.png

Fig. 172 Visualization of the methanol COSMO solvent surface.

Notes

The SolventSurface object saves and stores a solvent surface that is used in a continuum solvation DFT calculation. This object can be used to access the solvent surface created in a COSMO calculation. It enables manual inspection of the different properties of the solvent surface, including DFT calculated properties such as surface charge. Opening the SolventSurface in the Viewer creates a visualization of the surface which can be customized using the COSMO Surface Viewer plugin.

In order to obtain the solvent surface, an updated configuration with a suitable solvent model must be provided. This can either be a molecule or a surface configuration. In the case where a DFT-LCAO calculation with the COSMO model is performed, the SolventSurface returns a CosmoSolventSurface. The surface can be returned with either the evaluate or the surface methods.