mdsuite.transformations package¶
Submodules¶
- mdsuite.transformations.integrated_heat_current module
- mdsuite.transformations.ionic_current module
- mdsuite.transformations.kinaci_integrated_heat_current module
- mdsuite.transformations.map_molecules module
- mdsuite.transformations.momentum_flux module
- mdsuite.transformations.scale_coordinates module
- mdsuite.transformations.test_trafos module
- mdsuite.transformations.thermal_flux module
- mdsuite.transformations.transformation_dict module
- mdsuite.transformations.transformations module
- License
- Contact Information
- Citation
- Summary
CannotFindPropertyError
CannotFindTransformationError
MultiSpeciesTrafo
SingleSpeciesTrafo
Transformations
Transformations.database
Transformations.experiment
Transformations.batch_size
Transformations.n_batches
Transformations.remainder
Transformations.data_manager
Transformations.memory_manager
Transformations.database
Transformations.experiment
Transformations.find_property_per_config()
Transformations.find_property_single_val()
Transformations.get_generator_type_spec_and_const_data()
Transformations.get_prop_through_transformation()
Transformations.run_transformation()
- mdsuite.transformations.translational_dipole_moment module
- mdsuite.transformations.unwrap_coordinates module
- mdsuite.transformations.unwrap_via_indices module
- mdsuite.transformations.velocity_from_positions module
- mdsuite.transformations.wrap_coordinates module
Module contents¶
MDSuite: A Zincwarecode package.
License¶
This program and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zincwarecode Project.
Contact Information¶
email: zincwarecode@gmail.com github: https://github.com/zincware web: https://zincwarecode.com/
Citation¶
If you use this module please cite us with:
Summary¶
- class mdsuite.transformations.CoordinateUnwrapper[source]¶
Bases:
SingleSpeciesTrafo
Unwrap coordinates by checking if particles moved from one side of the box to the other within one time step.
- class mdsuite.transformations.CoordinateWrapper(center_box: bool = True)[source]¶
Bases:
SingleSpeciesTrafo
Wrap coordinates into the simulation box.
- class mdsuite.transformations.IntegratedHeatCurrent[source]¶
Bases:
MultiSpeciesTrafo
Transformation to calculate the integrated heat current (positions * energies).
- transform_batch(batch: Dict[str, Dict[str, Tensor]], carryover: Optional[Any] = None) Tensor [source]¶
Do the actual transformation.
- Parameters:
batch (dict) – The batch to be transformed. structure is {‘Species1’: {‘Property1’: tensordata, …}, …}
carryover (any) – if the transformation batching is only possible with carryover, this argument will provide it, see below.
- Returns:
Either the transformed batch (tf.Tensor)
Or tuple of (<transformed batch>, <carryover>),
where the carryover can have any type.
The carryover will be used as the optional argument for the next batch
- class mdsuite.transformations.IonicCurrent[source]¶
Bases:
MultiSpeciesTrafo
Transformation to calculate the ionic current (charge * velocities).
- transform_batch(batch: Dict[str, Dict[str, Tensor]], carryover: Optional[Any] = None) Tensor [source]¶
Do the actual transformation.
- Parameters:
batch (dict) – The batch to be transformed. structure is {‘Species1’: {‘Property1’: tensordata, …}, …}
carryover (any) – if the transformation batching is only possible with carryover, this argument will provide it, see below.
- Returns:
Either the transformed batch (tf.Tensor)
Or tuple of (<transformed batch>, <carryover>),
where the carryover can have any type.
The carryover will be used as the optional argument for the next batch
- class mdsuite.transformations.KinaciIntegratedHeatCurrent[source]¶
Bases:
MultiSpeciesTrafo
Transformation to calculate the Kinaci integrated heat current.
- transform_batch(batch: Dict[str, Dict[str, Tensor]], carryover: Optional[Tensor] = None) Tuple[Tensor, Tensor] [source]¶
Do the actual transformation.
- Parameters:
batch (dict) – The batch to be transformed. structure is {‘Species1’: {‘Property1’: tensordata, …}, …}
carryover (any) – if the transformation batching is only possible with carryover, this argument will provide it, see below.
- Returns:
Either the transformed batch (tf.Tensor)
Or tuple of (<transformed batch>, <carryover>),
where the carryover can have any type.
The carryover will be used as the optional argument for the next batch
- class mdsuite.transformations.MolecularMap[source]¶
Bases:
Transformations
Class for mapping atoms in a database to molecules.
- scale_function¶
A dictionary referencing the memory/time scaling function of the transformation.
- Type:
- molecules¶
Molecule dictionary to use as reference. e.g.
{'emim': {'smiles': 'CCN1C=C[N+](+C1)C', 'amount': 20}, 'PF6': {'smiles': 'F[P-](F)(F)(F)(F)F', 'amount': 20}}
would be the input for the emim-PF6 ionic liquid.
- Type:
- class mdsuite.transformations.MomentumFlux[source]¶
Bases:
MultiSpeciesTrafo
Transformation to calculate the momentum flux.
- transform_batch(batch: Dict[str, Dict[str, Tensor]], carryover: Optional[Any] = None) Tensor [source]¶
Do the actual transformation.
- Parameters:
batch (dict) – The batch to be transformed. structure is {‘Species1’: {‘Property1’: tensordata, …}, …}
carryover (any) – if the transformation batching is only possible with carryover, this argument will provide it, see below.
- Returns:
Either the transformed batch (tf.Tensor)
Or tuple of (<transformed batch>, <carryover>),
where the carryover can have any type.
The carryover will be used as the optional argument for the next batch
- class mdsuite.transformations.ScaleCoordinates[source]¶
Bases:
SingleSpeciesTrafo
Scale coordinates by multiplying them with the box size.
- class mdsuite.transformations.ThermalFlux[source]¶
Bases:
MultiSpeciesTrafo
Transformation to calculate the integrated heat current (positions * energies).
- transform_batch(batch: Dict[str, Dict[str, Tensor]], carryover: Optional[Any] = None) Tensor [source]¶
Do the actual transformation.
- Parameters:
batch (dict) – The batch to be transformed. structure is {‘Species1’: {‘Property1’: tensordata, …}, …}
carryover (any) – if the transformation batching is only possible with carryover, this argument will provide it, see below.
- Returns:
Either the transformed batch (tf.Tensor)
Or tuple of (<transformed batch>, <carryover>),
where the carryover can have any type.
The carryover will be used as the optional argument for the next batch
- class mdsuite.transformations.Transformations(input_properties: Optional[Iterable[PropertyInfo]] = None, output_property: Optional[PropertyInfo] = None, scale_function=None, dtype=tf.float64)[source]¶
Bases:
object
Parent class for MDSuite transformations.
- data_manager¶
data manager for handling the data transfer
- Type:
- memory_manager¶
memory manager for the computation.
- Type:
- property database¶
Update the database.
replace for https://github.com/zincware/MDSuite/issues/404
- property experiment: Experiment¶
//github.com/zincware/MDSuite/issues/404.
- Type:
TODO replace for https
- class mdsuite.transformations.TranslationalDipoleMoment[source]¶
Bases:
MultiSpeciesTrafo
Transformation to compute the translational dipole moment (charge * positions).
- transform_batch(batch: Dict[str, Dict[str, Tensor]], carryover: Optional[Any] = None) Tensor [source]¶
Do the actual transformation.
- Parameters:
batch (dict) – The batch to be transformed. structure is {‘Species1’: {‘Property1’: tensordata, …}, …}
carryover (any) – if the transformation batching is only possible with carryover, this argument will provide it, see below.
- Returns:
Either the transformed batch (tf.Tensor)
Or tuple of (<transformed batch>, <carryover>),
where the carryover can have any type.
The carryover will be used as the optional argument for the next batch
- class mdsuite.transformations.UnwrapViaIndices[source]¶
Bases:
SingleSpeciesTrafo
Unwrap corrdinates via the box images (pos + box_length * box_image_idx).
- class mdsuite.transformations.VelocityFromPositions[source]¶
Bases:
SingleSpeciesTrafo
Calculate the velocity based on the particle positions via simple forward derivative, i.e. v(t) = (x(t+dt)-x(t))/dt. The last velocity of the trajectory cannot be computed and is copied from the second to last.