@@ -80,6 +80,7 @@
Loading
80 80
            "basis": settings.basis,
81 81
            "method": settings.method,
82 82
            "enable_pcm": enable_pcm,
83 +
            "dft_settings": settings.psi4_dft_grid_settings.value,
83 84
        }
84 85
85 86
        if enable_pcm:

@@ -249,9 +249,13 @@
Loading
249 249
    basis = Column(String, nullable=False)
250 250
    method = Column(String, nullable=False)
251 251
252 +
    psi4_dft_grid_settings = Column(String, nullable=False)
253 +
252 254
    @classmethod
253 255
    def _hash(cls, instance: ESPSettings) -> int:
254 -
        return hash((instance.basis, instance.method))
256 +
        return hash(
257 +
            (instance.basis, instance.method, instance.psi4_dft_grid_settings.value)
258 +
        )
255 259
256 260
    @classmethod
257 261
    def _query(cls, db: Session, instance: ESPSettings) -> Query:
@@ -259,11 +263,20 @@
Loading
259 263
            db.query(DBESPSettings)
260 264
            .filter(DBESPSettings.basis == instance.basis)
261 265
            .filter(DBESPSettings.method == instance.method)
266 +
            .filter(
267 +
                DBESPSettings.psi4_dft_grid_settings
268 +
                == instance.psi4_dft_grid_settings.value
269 +
            )
262 270
        )
263 271
264 272
    @classmethod
265 273
    def _instance_to_db(cls, instance: ESPSettings) -> "DBESPSettings":
266 -
        return DBESPSettings(**instance.dict(exclude={"grid_settings", "pcm_settings"}))
274 +
        return DBESPSettings(
275 +
            **instance.dict(
276 +
                exclude={"grid_settings", "pcm_settings", "psi4_dft_grid_settings"}
277 +
            ),
278 +
            psi4_dft_grid_settings=instance.psi4_dft_grid_settings.value
279 +
        )
267 280
268 281
269 282
class DBConformerRecord(DBBase):

@@ -1,5 +1,6 @@
Loading
1 1
import abc
2 2
import os
3 +
from enum import Enum
3 4
from typing import TYPE_CHECKING, Optional, Tuple
4 5
5 6
import numpy
@@ -16,6 +17,30 @@
Loading
16 17
    from pydantic import PositiveFloat
17 18
18 19
20 +
class DFTGridSettings(Enum):
21 +
    """An enumeration of the possible DFT grid settings to use when computing
22 +
    properties using PSI4.
23 +
24 +
    * Default - The values of `dft_spherical_points`, `dft_radial_points`,
25 +
      and `dft_pruning_scheme` are not explicitly set and are left for Psi4 to
26 +
      select.
27 +
    * Medium - `dft_spherical_points=434`, `dft_radial_points=85`,
28 +
      `dft_pruning_scheme=robust` [1]_.
29 +
    * Fine - `dft_spherical_points=590`, `dft_radial_points=99`,
30 +
      `dft_pruning_scheme=robust` [2]_.
31 +
32 +
    References
33 +
    ----------
34 +
    [1] http://forum.psicode.org/t/dft-scf-not-converging/1725/7 (accessed 22/09/2020)
35 +
    [2] http://www.psicode.org/psi4manual/1.3.2/dft.html#grid-selection
36 +
        (accessed 22/09/2020)
37 +
    """
38 +
39 +
    Default = "default"
40 +
    Medium = "medium"
41 +
    Fine = "fine"
42 +
43 +
19 44
class PCMSettings(BaseModel):
20 45
    """A class which describes the polarizable continuum model (PCM)
21 46
    to include in the calculation of an ESP.
@@ -63,6 +88,12 @@
Loading
63 88
        "model in the ESP calculation.",
64 89
    )
65 90
91 +
    psi4_dft_grid_settings: DFTGridSettings = Field(
92 +
        DFTGridSettings.Default,
93 +
        description="The DFT grid settings to use when performing computations with "
94 +
        "Psi4.",
95 +
    )
96 +
66 97
67 98
class ESPGenerator(abc.ABC):
68 99
    """A base class for classes which are able to generate the electrostatic

@@ -1,3 +1,8 @@
Loading
1 -
from openff.recharge.esp.esp import ESPGenerator, ESPSettings, PCMSettings
1 +
from openff.recharge.esp.esp import (
2 +
    DFTGridSettings,
3 +
    ESPGenerator,
4 +
    ESPSettings,
5 +
    PCMSettings,
6 +
)
2 7
3 -
__all__ = [ESPGenerator, ESPSettings, PCMSettings]
8 +
__all__ = [DFTGridSettings, ESPGenerator, ESPSettings, PCMSettings]
Files Coverage
openff/recharge 98.02%
Project Totals (31 files) 98.02%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading