Skip to content

Commit 4830747

Browse files
committed
Update input for PCM
1 parent 74dadcc commit 4830747

18 files changed

+291
-259
lines changed

doc/users/user_ref.rst

+60-58
Original file line numberDiff line numberDiff line change
@@ -860,114 +860,116 @@ User input reference
860860

861861
**Default** ``user['SCF']['kain']``
862862

863-
:Cavity: Define the interlocking spheres cavity.
864-
865-
:red:`Keywords`
866-
:mode: Determines how to set up the interlocking spheres cavity. ``atoms``: centers are taken from the molecular geometry, radii taken from tabulated data (van der Waals radius), and rescaled using the parameters ``alpha``, ``beta`` and ``sigma`` (R_i <- alpha*R_i + beta*sigma). Default spheres can be modified and/or extra spheres added, using the ``$spheres`` section, see documentation. ``explicit``: centers and radii given explicitly in the ``spheres`` block.
867-
868-
**Type** ``str``
869-
870-
**Default** ``atoms``
863+
:Solvent: Parameters for the Self-Consistent Reaction Field optimization.
871864

872-
**Predicates**
873-
- ``value.lower() in ['atoms', 'explicit']``
865+
:red:`Sections`
866+
:Permittivity: Parameters for the permittivity function.
874867

875-
:spheres: This input parameter affects the list of spheres used to generate the cavity. In all cases, values for the radius, the radius scaling factor (``alpha``), the width (``sigma``), and the width scaling factor (``beta``) can be modified. If they are not specified their global default values are used. In ``atoms`` mode, we *modify* the default list of spheres, built with centers from the molecular geometry and radii from internal tabulated van der Waals values. To *substitute* a sphere, include a line like: `` $spheres i R [alpha] [beta] [sigma] $end `` to specify that the ``i`` atom in the molecule (0-based indexing) should use radius ``R`` instead of the pre-tabulated vdW radius. To *add* a sphere, include a line like: `` $spheres x y z R [alpha] [beta] [sigma] $end ``` to specify that a sphere of radius ``R`` should be added at position ``(x, y, z)``. Spheres added in this way are not aware of their parent atom, if any. They will **not** contribute to the molecular gradient. In ``explicit`` mode, we *build* the complete sphere list from scratch. You can add a line like: `` $spheres x y z R [alpha] [beta] [sigma] $end `` to specify that a sphere of radius ``R`` should be added at position ``(x, y, z)``. Spheres added in this way are not aware of their parent atom, if any. They will **not** contribute to the molecular gradient. Alternatively, you can specify a line like: `` $spheres i R [alpha] [beta] [sigma] $end `` to specify that the ``i`` atom in the molecule (0-based indexing) should use radius ``R``. Spheres added in this way are aware of their parent atom. They will contribute to the molecular gradient.
868+
:red:`Keywords`
869+
:epsilon_in: Permittivity inside the cavity. 1.0 is the permittivity of free space, anything other than this is undefined behaviour.
876870

877-
**Type** ``str``
871+
**Type** ``float``
878872

879-
**Default** ````
873+
**Default** ``1.0``
880874

881-
:alpha: Scaling factor on the radius term for the cavity rescaling (R_i <- alpha*R_i + beta*sigma). Only used for the default vdW radii in `atoms` mode, not if explicit ``$spheres`` are given.
875+
:formulation: Formulation of the Permittivity function. Currently only the exponential is available.
882876

883-
**Type** ``float``
877+
**Type** ``str``
884878

885-
**Default** ``1.1``
879+
**Default** ``exponential``
886880

887-
:beta: Scaling factor on the boundary width term for the cavity rescaling (R_i <- alpha*R_i + beta*sigma). Only used for the default vdW radii in `atoms` mode, not if explicit ``$spheres`` are given.
881+
**Predicates**
882+
- ``value.lower() in ['exponential']``
888883

889-
**Type** ``float``
884+
:red:`Sections`
885+
:epsilon_out: Parameters for the continuum solvent outside the cavity.
890886

891-
**Default** ``0.5``
887+
:red:`Keywords`
888+
:nonequilibrium: Whether to use the nonequilibrium formulation of response, *i.e.* use the dynamic permittivity for the calculation of the response reaction field. Defaults to false.
892889

893-
:sigma: Width of cavity boundary, smaller value means sharper transition. **This quantity has dimensions of length. The default value is in atomic units**.
890+
**Type** ``bool``
894891

895-
**Type** ``float``
892+
**Default** ``False``
896893

897-
**Default** ``0.2``
894+
:static: Static permittivity outside the cavity. This is characteristic of the solvent used.
898895

899-
:Permittivity: Parameters for the permittivity function.
896+
**Type** ``float``
900897

901-
:red:`Keywords`
902-
:epsilon_in: Permittivity inside the cavity. 1.0 is the permittivity of free space, anything other than this is undefined behaviour.
898+
**Default** ``1.0``
903899

904-
**Type** ``float``
900+
:dynamic: Dynamic permittivity outside the cavity. This is characteristic of the solvent used and relevant only in response calculations. Defaults to the same value as `epsilon_static`.
905901

906-
**Default** ``1.0``
902+
**Type** ``float``
907903

908-
:formulation: Formulation of the Permittivity function. Currently only the exponential is available.
904+
**Default** ``user['PCM']['Solvent']['Permittivity']['epsilon_out']['static']``
909905

910-
**Type** ``str``
906+
:DebyeHuckelScreening: Parameters for the Debye-Huckel screening factor
911907

912-
**Default** ``exponential``
908+
:red:`Keywords`
909+
:ion_strength: Ionic strength of the electrolyte in mol/L. This represents the concentration of the ions in the bulk solvent.
913910

914-
**Predicates**
915-
- ``value.lower() in ['exponential']``
911+
**Type** ``float``
916912

917-
:red:`Sections`
918-
:epsilon_out: Parameters for the continuum solvent outside the cavity.
913+
**Default** ``1.0``
919914

920-
:red:`Keywords`
921-
:nonequilibrium: Whether to use the nonequilibrium formulation of response, *i.e.* use the dynamic permittivity for the calculation of the response reaction field. Defaults to false.
915+
:ion_radius: Amount with which the vdw-radius of the atoms will be increased. The screening factor will have an area of effect that is often going to be larger than the vdw-cavity, but centered in the same atoms.
922916

923-
**Type** ``bool``
917+
**Type** ``float``
924918

925-
**Default** ``False``
919+
**Default** ``0.0``
926920

927-
:static: Static permittivity outside the cavity. This is characteristic of the solvent used.
921+
:ion_width: Width of the transition between the solute and the ion accessible part.
928922

929923
**Type** ``float``
930924

931-
**Default** ``1.0``
925+
**Default** ``0.2``
932926

933-
:dynamic: Dynamic permittivity outside the cavity. This is characteristic of the solvent used and relevant only in response calculations. Defaults to the same value as `epsilon_static`.
927+
:formulation: formulation of the debye-huckel screening factor. Currently only the variable factor is implemented. ``variable``: implement the screening functions as k = (1-C_ion)k_out
934928

935-
**Type** ``float``
929+
**Type** ``str``
936930

937-
**Default** ``user['PCM']['Permittivity']['epsilon_out']['static']``
931+
**Default** ``variable``
938932

939-
:D_H_screening: Parameters for the Debye-Huckel screening factor
933+
**Predicates**
934+
- ``value.lower() in ['variable']``
935+
936+
:Cavity: Define the interlocking spheres cavity.
940937

941938
:red:`Keywords`
942-
:ion_strength: Ionic strength of the electrolyte in mol/L. This represents the concentration of the ions in the bulk solvent.
939+
:mode: Determines how to set up the interlocking spheres cavity. ``atoms``: centers are taken from the molecular geometry, radii taken from tabulated data (van der Waals radius), and rescaled using the parameters ``alpha``, ``beta`` and ``sigma`` (R_i <- alpha*R_i + beta*sigma). Default spheres can be modified and/or extra spheres added, using the ``$spheres`` section, see documentation. ``explicit``: centers and radii given explicitly in the ``spheres`` block.
943940

944-
**Type** ``float``
941+
**Type** ``str``
945942

946-
**Default** ``1.0``
943+
**Default** ``atoms``
947944

948-
:ion_radius: Amount with which the vdw-radius of the atoms will be increased. The screening factor will have an area of effect that is often going to be larger than the vdw-cavity, but centered in the same atoms.
945+
**Predicates**
946+
- ``value.lower() in ['atoms', 'explicit']``
949947

950-
**Type** ``float``
948+
:spheres: This input parameter affects the list of spheres used to generate the cavity. In all cases, values for the radius, the radius scaling factor (``alpha``), the width (``sigma``), and the width scaling factor (``beta``) can be modified. If they are not specified their global default values are used. In ``atoms`` mode, we *modify* the default list of spheres, built with centers from the molecular geometry and radii from internal tabulated van der Waals values. To *substitute* a sphere, include a line like: `` $spheres i R [alpha] [beta] [sigma] $end `` to specify that the ``i`` atom in the molecule (0-based indexing) should use radius ``R`` instead of the pre-tabulated vdW radius. To *add* a sphere, include a line like: `` $spheres x y z R [alpha] [beta] [sigma] $end ``` to specify that a sphere of radius ``R`` should be added at position ``(x, y, z)``. Spheres added in this way are not aware of their parent atom, if any. They will **not** contribute to the molecular gradient. In ``explicit`` mode, we *build* the complete sphere list from scratch. You can add a line like: `` $spheres x y z R [alpha] [beta] [sigma] $end `` to specify that a sphere of radius ``R`` should be added at position ``(x, y, z)``. Spheres added in this way are not aware of their parent atom, if any. They will **not** contribute to the molecular gradient. Alternatively, you can specify a line like: `` $spheres i R [alpha] [beta] [sigma] $end `` to specify that the ``i`` atom in the molecule (0-based indexing) should use radius ``R``. Spheres added in this way are aware of their parent atom. They will contribute to the molecular gradient.
951949

952-
**Default** ``0.0``
950+
**Type** ``str``
951+
952+
**Default** ````
953953

954-
:ion_width: Width of the transition between the solute and the ion accessible part.
954+
:alpha: Scaling factor on the radius term for the cavity rescaling (R_i <- alpha*R_i + beta*sigma). Only used for the default vdW radii in `atoms` mode, not if explicit ``$spheres`` are given.
955955

956956
**Type** ``float``
957957

958-
**Default** ``0.2``
958+
**Default** ``1.1``
959+
960+
:beta: Scaling factor on the boundary width term for the cavity rescaling (R_i <- alpha*R_i + beta*sigma). Only used for the default vdW radii in `atoms` mode, not if explicit ``$spheres`` are given.
959961

960-
:formulation: formulation of the debye-huckel screening factor. Currently only the variable factor is implemented. ``variable``: implement the screening functions as k = (1-C_ion)k_out
962+
**Type** ``float``
961963

962-
**Type** ``str``
964+
**Default** ``0.5``
963965

964-
**Default** ``variable``
966+
:sigma: Width of cavity boundary, smaller value means sharper transition. **This quantity has dimensions of length. The default value is in atomic units**.
965967

966-
**Predicates**
967-
- ``value.lower() in ['variable']``
968+
**Type** ``float``
968969

970+
**Default** ``0.2``
969971

970-
:GeometryOptimizer: Includes parameters related to the internal geometry optimization using the SQNM (Stabilized Quasi-Newton Method) for noisy PES.
972+
:GeometryOptimizer: Includes parameters related to the internal geometry optimization using the SQNM (Stabilized Quasi-Newton Method) for noisy PES.
971973

972974
:red:`Keywords`
973975
:run: Run optimizer. Otherwise single point energy/properties are computed.

python/mrchem/helpers.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -138,24 +138,24 @@ def _reaction_operator_handler(user_dict, rsp=False):
138138
"dynamic_thrs": user_dict["PCM"]["SCRF"]["dynamic_thrs"],
139139
# if doing a response calculation, then density_type is set to 1 (electronic only)
140140
"density_type": 1 if rsp else density_type,
141-
"epsilon_in": user_dict["PCM"]["Permittivity"]["epsilon_in"],
142-
"epsilon_static": user_dict["PCM"]["Permittivity"]["epsilon_out"]["static"],
143-
"epsilon_dynamic": user_dict["PCM"]["Permittivity"]["epsilon_out"]["dynamic"],
144-
"nonequilibrium": user_dict["PCM"]["Permittivity"]["epsilon_out"][
141+
"epsilon_in": user_dict["PCM"]["Solvent"]["Permittivity"]["epsilon_in"],
142+
"epsilon_static": user_dict["PCM"]["Solvent"]["Permittivity"]["epsilon_out"]["static"],
143+
"epsilon_dynamic": user_dict["PCM"]["Solvent"]["Permittivity"]["epsilon_out"]["dynamic"],
144+
"nonequilibrium": user_dict["PCM"]["Solvent"]["Permittivity"]["epsilon_out"][
145145
"nonequilibrium"
146146
],
147-
"formulation": user_dict["PCM"]["Permittivity"]["formulation"],
147+
"formulation": user_dict["PCM"]["Solvent"]["Permittivity"]["formulation"],
148148
"kappa_out": 0.0,
149-
"ion_radius": user_dict["PCM"]["D_H_screening"]["ion_radius"],
150-
"ion_width": user_dict["PCM"]["D_H_screening"]["ion_width"],
151-
"DHS-formulation": user_dict["PCM"]["D_H_screening"]["formulation"],
149+
"ion_radius": user_dict["PCM"]["Solvent"]["DebyeHuckelScreening"]["ion_radius"],
150+
"ion_width": user_dict["PCM"]["Solvent"]["DebyeHuckelScreening"]["ion_width"],
151+
"DHS-formulation": user_dict["PCM"]["Solvent"]["DebyeHuckelScreening"]["formulation"],
152152
}
153153

154154
# ionic solvent continuum model
155155
ionic_model = user_dict["WaveFunction"]["environment"].lower().split("_")[-1]
156156
if ionic_model in ("pb", "lpb"):
157-
permittivity = user_dict["PCM"]["Permittivity"]["epsilon_out"]["static"]
158-
ionic_strength = user_dict["PCM"]["D_H_screening"]["ion_strength"]
157+
permittivity = user_dict["PCM"]["Solvent"]["Permittivity"]["epsilon_out"]["static"]
158+
ionic_strength = user_dict["PCM"]["Solvent"]["DebyeHuckelScreening"]["ion_strength"]
159159
kappa_out = compute_kappa(user_dict["Constants"], permittivity, ionic_strength)
160160
reo_dict |= {
161161
"kappa_out": kappa_out,

0 commit comments

Comments
 (0)