- class matlantis_features.features.reaction.reaction_string.ReactionStringFeatureResult(feature: ReactionStringFeature, call_params: Dict[str, Any], output: ReactionStringFeatureOutput, calculator_info: Optional[Dict[str, Any]], version_info: Dict[str, Any], user_info: Dict[str, Any])#
-
Bases:
FeatureBaseResult
A dataclass containing the result for ReactionStringFeature.
Methods
__init__
(feature, call_params, output, …)from_dict
(res)Construct a FeatureBaseResult object from serialized dict.
load
(filename)Construct a FeatureBaseResult object from serialized dict.
plot_energy
([segment_id, plt_name])Plot the energy profile along the reaction path.
save
(filename)Construct a FeatureBaseResult object from serialized dict.
to_dict
()Dictionary representation of the FeatureBaseResult.
to_gif
([gif_name, rotation])Creates gif file to show the movement of atoms along the reaction path.
to_traj
(traj_name)Creates ase.io.Trajectory to save the reaction path.
- __init__(feature: ReactionStringFeature, call_params: Dict[str, Any], output: ReactionStringFeatureOutput, calculator_info: Optional[Dict[str, Any]], version_info: Dict[str, Any], user_info: Dict[str, Any]) None #
- classmethod from_dict(res: Dict[str, Any]) FeatureBaseResult #
-
Construct a FeatureBaseResult object from serialized dict.
- Parameters
-
res (dict[str, Any]) – A dict containing a serialized FeatureBaseResult from to_dict().
- Returns
-
The deserialized object from provided dict.
- Return type
- classmethod load(filename: str) FeatureBaseResult #
-
Construct a FeatureBaseResult object from serialized dict.
- Parameters
-
filename (str) – Name of file to save the FeatureBaseResult to.
- Returns
-
The FeatureBaseResult object if loading was successful.
- Return type
- plot_energy(segment_id: Optional[int] = None, plt_name: Optional[str] = None) Figure #
-
Plot the energy profile along the reaction path.
- Parameters
-
-
segment_id (int or None, optional) – The index of the segment of path to plot. If None, all the path segments will be
plotted togather. Defaults to None. -
plt_name (str or None, optional) – The file name to which the plot of the energy profile
will be saved. Supported formats include ‘png’ ‘jpg’ ‘jpeg’ ‘webp’ ‘svg’
and ‘pdf’. If ‘None’ is provided, the figure will not be saved. Defaults to None.
-
- Returns
-
The plot of the energy profile in the reaction string calculation result as a
plotly.graph_objects.Figure instance. - Return type
-
go.Figure
- save(filename: str) bool #
-
Construct a FeatureBaseResult object from serialized dict.
- Parameters
-
filename (str) – Name of file to save the FeatureBaseResult to.
- Returns
-
Whether saving the result was successful or not.
- Return type
-
bool
- to_dict() Dict[str, Any] #
-
Dictionary representation of the FeatureBaseResult.
- Returns
-
A dict containing a serialized FeatureBaseResult.
- Return type
-
dict[str, Any]
- to_gif(gif_name: Optional[str] = None, rotation: str = ‘0x,0y,0z’) None #
-
Creates gif file to show the movement of atoms along the reaction path.
- Parameters
-
-
gif_name (str or None, optional) – The file name to which the reaction path will be
saved. Defaults to None. -
rotation (str, optional) – The viewing angle. Defaults to ‘0x,0y,0z’.
-
- to_traj(traj_name: str) None #
-
Creates ase.io.Trajectory to save the reaction path.
- Parameters
-
traj_name (str) – The file name to which the NEB trajectory will be saved.
Attributes
- feature: ReactionStringFeature#
- output: ReactionStringFeatureOutput#
- call_params: Dict[str, Any]#
- calculator_info: Optional[Dict[str, Any]]#
- version_info: Dict[str, Any]#
- user_info: Dict[str, Any]#
Resource Library
matlantis_features.features.reaction.reaction_string.ReactionStringFeatureResult