Loading...
Searching...
No Matches
gpridge::fessurrogate Interface Reference

Gaussian process over a free energy F(s) on collective variables. Point arrays are s(dimension, n): one column per point. More...

Public Member Functions

procedure dimension (self)
procedure n_observations (self)
procedure train (self, s, f, f_noise_var, grad_f, grad_noise_var, grad_present, stat, errmsg)
 Train on F at the columns of s. grad_F and grad_noise_var must have the shape of s (dimension x n). grad_present (n) is with them, or all three are absent. Any other shape is rejected.
procedure predict (self, s, f, grad_f, var_f, stat, errmsg)
 Posterior mean F(n) at the n columns of s, with the mean gradient grad_F(dimension, n) and the latent variance var_F(n) when present. Outputs of any other shape are rejected unwritten.
procedure rate_path (self, path, reactant, product, diffusion, config, report, stat, errmsg)
 Posterior-sampled Kramers rate along the columns of path. The indices are 1-based; diffusion(dimension) is the diagonal of the diffusion tensor.
procedure is_valid (self)
procedure get_handle (self)
procedure release (self)
generic, public assignment assign
final fes_finalize (self)
type(fessurrogate) function fes_constructor (dimension, model_config, fes_config, grad_noise_var, stat, errmsg)
 Create a surrogate; absent configurations take the library defaults. grad_noise_var(dimension) is added to each observed gradient component; absent, the library divides the value noise by the squared spread of the training points along each coordinate.

Public Attributes

integer, pointer references => null()

Detailed Description

Gaussian process over a free energy F(s) on collective variables. Point arrays are s(dimension, n): one column per point.

Definition at line 2826 of file gpridge.f90.

Constructor & Destructor Documentation

◆ fes_finalize()

final gpridge::fessurrogate::fes_finalize ( type(fessurrogate), intent(inout) self)
final

Definition at line 2841 of file gpridge.f90.

Member Function/Subroutine Documentation

◆ assignment()

generic, public gpridge::fessurrogate::assignment

Definition at line 2840 of file gpridge.f90.

◆ dimension()

procedure gpridge::fessurrogate::dimension ( class(fessurrogate), intent(in) self)

Definition at line 2831 of file gpridge.f90.

◆ fes_constructor()

type(fessurrogate) function gpridge::fessurrogate::fes_constructor ( integer, intent(in) dimension,
type(modelconfig), intent(in), optional model_config,
type(fesconfig), intent(in), optional fes_config,
real(c_double), dimension(:), intent(in), optional grad_noise_var,
integer, intent(out), optional stat,
character(len=*), intent(inout), optional errmsg )

Create a surrogate; absent configurations take the library defaults. grad_noise_var(dimension) is added to each observed gradient component; absent, the library divides the value noise by the squared spread of the training points along each coordinate.

Definition at line 5583 of file gpridge.f90.

5585 integer, intent(in) :: dimension
5586 type(ModelConfig), intent(in), optional :: model_config
5587 type(FESConfig), intent(in), optional :: fes_config
5588 real(c_double), intent(in), optional :: grad_noise_var(:)
5589 integer, intent(out), optional :: stat
5590 character(len=*), intent(inout), optional :: errmsg
5591 type(FESSurrogate) :: self
5592 type(ModelConfig) :: model
5593 type(FESConfig) :: fes
5594 real(c_double), allocatable, target :: noise(:)
5595 type(c_ptr) :: noise_ptr
5596 integer(c_size_t) :: noise_len
5597 integer(c_int) :: rc
5598
5599 if (present(model_config)) then
5600 model = model_config
5601 else
5602 model = c_gpr_model_config_defaults()
5603 end if
5604 if (present(fes_config)) then
5605 fes = fes_config
5606 else
5607 rc = c_gpr_fes_config_init(fes, c_sizeof(fes))
5608 end if
5609 noise_ptr = c_null_ptr
5610 noise_len = 0
5611 if (present(grad_noise_var)) then
5612 noise = grad_noise_var
5613 noise_ptr = c_loc(noise)
5614 noise_len = size(noise, kind=c_size_t)
5615 end if
5616 self%handle = c_gpr_fes_create(int(dimension, c_int), model, fes, &
5617 noise_ptr, noise_len)
5618 if (c_associated(self%handle)) then
5619 allocate(self%references, source=1)
5620 rc = gpr_success
5621 else
5622 rc = failed_status()
5623 end if
5624 call report_status(rc, stat, errmsg)

◆ get_handle()

procedure gpridge::fessurrogate::get_handle ( class(fessurrogate), intent(in) self)

Definition at line 2837 of file gpridge.f90.

◆ is_valid()

procedure gpridge::fessurrogate::is_valid ( class(fessurrogate), intent(in) self)

Definition at line 2836 of file gpridge.f90.

◆ n_observations()

procedure gpridge::fessurrogate::n_observations ( class(fessurrogate), intent(in) self)

Definition at line 2832 of file gpridge.f90.

◆ predict()

procedure gpridge::fessurrogate::predict ( class(fessurrogate), intent(in) self,
real(c_double), dimension(:,:), intent(in), contiguous s,
real(c_double), dimension(:), intent(inout) f,
real(c_double), dimension(:,:), intent(inout), optional grad_f,
real(c_double), dimension(:), intent(inout), optional var_f,
integer, intent(out), optional stat,
character(len=*), intent(inout), optional errmsg )

Posterior mean F(n) at the n columns of s, with the mean gradient grad_F(dimension, n) and the latent variance var_F(n) when present. Outputs of any other shape are rejected unwritten.

Definition at line 2834 of file gpridge.f90.

◆ rate_path()

procedure gpridge::fessurrogate::rate_path ( class(fessurrogate), intent(in) self,
real(c_double), dimension(:,:), intent(in), contiguous path,
integer, intent(in) reactant,
integer, intent(in) product,
real(c_double), dimension(:), intent(in), contiguous diffusion,
type(fesrateconfig), intent(in) config,
type(fesratereport), intent(inout) report,
integer, intent(out), optional stat,
character(len=*), intent(inout), optional errmsg )

Posterior-sampled Kramers rate along the columns of path. The indices are 1-based; diffusion(dimension) is the diagonal of the diffusion tensor.

Definition at line 2835 of file gpridge.f90.

◆ release()

procedure gpridge::fessurrogate::release ( class(fessurrogate), intent(inout) self)

Definition at line 2838 of file gpridge.f90.

◆ train()

procedure gpridge::fessurrogate::train ( class(fessurrogate), intent(inout) self,
real(c_double), dimension(:,:), intent(in), contiguous s,
real(c_double), dimension(:), intent(in), contiguous f,
real(c_double), dimension(:), intent(in), optional f_noise_var,
real(c_double), dimension(:,:), intent(in), optional grad_f,
real(c_double), dimension(:,:), intent(in), optional grad_noise_var,
logical, dimension(:), intent(in), optional grad_present,
integer, intent(out), optional stat,
character(len=*), intent(inout), optional errmsg )

Train on F at the columns of s. grad_F and grad_noise_var must have the shape of s (dimension x n). grad_present (n) is with them, or all three are absent. Any other shape is rejected.

Definition at line 2833 of file gpridge.f90.

Member Data Documentation

◆ references

integer, pointer gpridge::fessurrogate::references => null()

Definition at line 2829 of file gpridge.f90.

2829 integer, pointer :: references => null()

The documentation for this interface was generated from the following file: