nanotools.bindingcurve module
- class nanotools.bindingcurve.BindingCurve(displacements=None, separations=<Quantity([3. 3.2 3.4 3.6 3.8 4. 4.2 4.4 4.6 4.8 5. ], 'angstrom')>, free_energies=None, total_energy_calc: ~nanotools.totalenergy.TotalEnergy | None = None, workdir='./')[source]
Bases:
Base
- get_curve_fit()[source]
Returns a spline interpolation function.
- Returns:
spline interpolator.
- Return type:
PPoly
- get_free_energies()[source]
Returns the free energy of each separation.
- Returns:
list of free energies.
- Return type:
List[Quantity]
- plot(figure=None, filename=None, shift=False, show=True, label=None)[source]
Plot the binding curve.
- Parameters:
figure (Figure, optional) – Pyplot figure handle. Defaults to None.
filename (str, optional) – if not None, the figure is saved to filename. Defaults to None.
shift (bool, optional) – shift the last energy to zero. Defaults to False.
show (bool, optional) – display figure before returning. Defaults to True.
label (str, optional) – label for the legend. Defaults to None.
- Returns:
Pyplot figure handle.
- Return type:
Figure
- class nanotools.bindingcurve.Displacement(separation, free_energy=None, workdir: str = '/')[source]
Bases:
Base
Displacement
class.- separation
Quantity Distance between the two atoms.
- Type:
pint.registry.Quantity
- free_energy
Quantity Free energy of the system.
- Type:
pint.registry.Quantity
- workdir
str Working directory for calculations.
- Type:
str
- get_free_energy()[source]
Returns the free energy of the system.
- Raises:
Exception – Missing output file.
- Returns:
Free energy
- Return type:
float
- solve(calc)[source]
Performs a total energy calculation.
- Parameters:
calc (TotalEnergy) – total energy calculator.