IMLCV.implementations package#
Subpackages#
Submodules#
IMLCV.implementations.CV module#
- class IMLCV.implementations.CV.DistraxRealNVP(*, cv_input=None, latent_dim, parent=<flax.linen.module._Sentinel object>, name=None)[source]#
Bases:
CvFunDistrax- scope: Optional[Scope] = None#
- class IMLCV.implementations.CV.MetricUMAP(periodicities, bounding_box=None)[source]#
Bases:
CvMetric
- class IMLCV.implementations.CV.RealNVP(*, cv_input=None, features, parent=<flax.linen.module._Sentinel object>, name=None)[source]#
Bases:
CvFunNnuse in combination with swaplink
- scope: Optional[Scope] = None#
- setup()[source]#
Initializes a Module lazily (similar to a lazy
__init__).setupis called once lazily on a module instance when a module is bound, immediately before any other methods like__call__are invoked, or before asetup-defined attribute on self is accessed.This can happen in three cases: :rtype:
NoneImmediately when invoking
apply(),init()orinit_and_output().Once the module is given a name by being assigned to an attribute of another module inside the other module’s
setupmethod (see__setattr__()):class MyModule(nn.Module): def setup(self): submodule = Conv(...) # Accessing `submodule` attributes does not yet work here. # The following line invokes `self.__setattr__`, which gives # `submodule` the name "conv1". self.conv1 = submodule # Accessing `submodule` attributes or methods is now safe and # either causes setup() to be called once.
Once a module is constructed inside a method wrapped with
compact(), immediately before another method is called orsetupdefined attribute is accessed.
- IMLCV.implementations.CV.dihedral(numbers)[source]#
from https://stackoverflow.com/questions/20305272/dihedral-torsion- angle-from-four-points-in-cartesian- coordinates-in-python.
- IMLCV.implementations.CV.get_sinkhorn_divergence(nli, pi, sort='rematch', alpha_rematch=0.1)[source]#
IMLCV.implementations.CvDiscovery module#
- class IMLCV.implementations.CvDiscovery.Decoder(latents, layers, nunits, dim, parent=<flax.linen.module._Sentinel object>, name=None)[source]#
Bases:
Module- scope: Optional[Scope] = None#
- class IMLCV.implementations.CvDiscovery.Encoder(latents, layers, nunits, dim, parent=<flax.linen.module._Sentinel object>, name=None)[source]#
Bases:
Module- scope: Optional[Scope] = None#
- class IMLCV.implementations.CvDiscovery.TranformerAutoEncoder(outdim, periodicity=None, bounding_box=None, descriptor='sb', descriptor_kwargs={})[source]#
Bases:
Transformer
- class IMLCV.implementations.CvDiscovery.TransoformerLDA(outdim, periodicity=None, bounding_box=None, descriptor='sb', descriptor_kwargs={})[source]#
Bases:
Transformer
- class IMLCV.implementations.CvDiscovery.VAE(latents, layers, nunits, dim, parent=<flax.linen.module._Sentinel object>, name=None)[source]#
Bases:
Module- scope: Optional[Scope] = None#
- setup()[source]#
Initializes a Module lazily (similar to a lazy
__init__).setupis called once lazily on a module instance when a module is bound, immediately before any other methods like__call__are invoked, or before asetup-defined attribute on self is accessed.This can happen in three cases:
Immediately when invoking
apply(),init()orinit_and_output().Once the module is given a name by being assigned to an attribute of another module inside the other module’s
setupmethod (see__setattr__()):class MyModule(nn.Module): def setup(self): submodule = Conv(...) # Accessing `submodule` attributes does not yet work here. # The following line invokes `self.__setattr__`, which gives # `submodule` the name "conv1". self.conv1 = submodule # Accessing `submodule` attributes or methods is now safe and # either causes setup() to be called once.
Once a module is constructed inside a method wrapped with
compact(), immediately before another method is called orsetupdefined attribute is accessed.
IMLCV.implementations.MdEngine module#
MD engine class peforms MD simulations in a given NVT/NPT ensemble.
Currently, the MD is done with YAFF/OpenMM
- class IMLCV.implementations.MdEngine.PlumedEngine(bias, static_trajectory_info, energy, trajectory_file=None, sp=None)[source]#
Bases:
YaffEngine
- class IMLCV.implementations.MdEngine.YaffEngine(bias, static_trajectory_info, energy, trajectory_file=None, sp=None, additional_parts=[])[source]#
-
MD engine with YAFF as backend.
- Parameters:
ff (yaff.pes.ForceField) –
IMLCV.implementations.bias module#
- class IMLCV.implementations.bias.BiasMTD(cvs, K, sigmas, tempering=0.0, start=None, step=None)[source]#
Bases:
BiasA sum of Gaussian hills, for instance used in metadynamics: Adapted from Yaff.
V = sum_{\alpha} K_{\alpha}} exp{-sum_{i} \frac{(q_i-q_{i,\alpha}^0)^2}{2sigma^2}}
where \alpha loops over deposited hills and i loops over collective variables.
- class IMLCV.implementations.bias.GridBias(cvs, vals, bounds, start=None, step=None, centers=True)[source]#
Bases:
BiasBias interpolated from lookup table on uniform grid.
values are caluclated in bin centers
- class IMLCV.implementations.bias.HarmonicBias(cvs, q0, k, k_max=None)[source]#
Bases:
BiasHarmonic bias potential centered arround q0 with force constant k.
- class IMLCV.implementations.bias.MinBias(biases)[source]#
Bases:
CompositeBias
- class IMLCV.implementations.bias.PlumedBias(collective_variable, timestep, kernel=None, fn='plumed.dat', fn_log='plumed.log')[source]#
Bases:
Bias
IMLCV.implementations.energy module#
- class IMLCV.implementations.energy.AseEnergy(atoms, calculator=None)[source]#
Bases:
EnergyConversion to ASE energy
- class IMLCV.implementations.energy.Cp2kEnergy(atoms, input_file, input_kwargs, cp2k_path=None, **kwargs)[source]#
Bases:
AseEnergy- default_parameters = {'auto_write': False, 'basis_set': None, 'basis_set_file': None, 'charge': None, 'cutoff': None, 'force_eval_method': None, 'inp': '', 'max_scf': None, 'poisson_solver': None, 'potential_file': None, 'print_level': 'LOW', 'pseudo_potential': None, 'stress_tensor': True, 'uks': False, 'xc': None}[source]#