This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Simple, self-contained example showing how to get Pydantic and Pint to play nicely together. | |
This uses Pydantic v2 (only). | |
This doesn't yet handle arrays or OpenMM objects, but should be tractable and is called out below. | |
No (explicit) effort is made to ensure floats or ints remain the same type and don't get ducked. | |
""" | |
from pint import UnitRegistry, Quantity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff | cat && cibuildwheel 15:13:06 ☁ 1.10.0 ☂ | |
diff --git a/basesetup.py b/basesetup.py | |
index a4535a9d..add89a4a 100644 | |
--- a/basesetup.py | |
+++ b/basesetup.py | |
@@ -60,9 +60,7 @@ class CompilerDetection: | |
self.compiler_args_sse2 = [] | |
self.compiler_args_sse3 = ["-mssse3"] if (self.sse3_enabled and not self.msvc) else [] | |
self.compiler_args_neon = [] | |
- self.compiler_args_warn = ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ micromamba repoquery whoneeds openmmforcefields -c conda-forge 8:45:32 ☁ temporarily-no-gaff ☂ | |
Getting repodata from channels... | |
conda-forge/osx-arm64 9.5MB @ 12.1MB/s 0.8s | |
conda-forge/noarch 14.5MB @ 14.1MB/s 1.0s | |
Name Version Build Depends Channel Subdir | |
──────────────────────────────────────────────────────────────────────────────── | |
asapdiscovery 0.3.1 py311h267d04e_1 conda-forge osx-arm64 | |
asapdiscovery 0.3.1 py310hbe9552e_1 conda-forge osx-arm64 | |
espaloma 0.3.1 pyhd8ed1ab_0 conda-forge noarch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Getting repodata from channels... | |
conda-forge/osx-arm64 Using cache | |
conda-forge/noarch Using cache | |
Name Version Build Depends Channel Subdir | |
──────────────────────────────────────────────────────────────────────────────────────────────── | |
abipy 0.7.0 pyh9f0ad1d_1 conda-forge noarch | |
abipy 0.9.7 pyhd8ed1ab_0 conda-forge noarch | |
abipy 0.8.0 pyh9f0ad1d_0 conda-forge noarch | |
abipy 0.9.0 pyhd8ed1ab_0 conda-forge noarch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openff.units import Quantity | |
from typing import Annotated | |
from pydantic import ( | |
BeforeValidator, | |
AfterValidator, | |
BaseModel, | |
ValidationError, | |
PositiveFloat, | |
) | |
from functools import partial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ _libgcc_mutex 0.1 conda_forge conda-forge/linux-64 Cached | |
+ _openmp_mutex 4.5 2_kmp_llvm conda-forge/linux-64 Cached | |
+ ambertools 23.3 py310h05519df_6 conda-forge/linux-64 94MB | |
+ amqp 5.2.0 pyhd8ed1ab_0 conda-forge/noarch 48kB | |
+ anyio 3.7.1 pyhd8ed1ab_0 conda-forge/noarch 97kB | |
+ argcomplete 3.1.6 pyhd8ed1ab_0 conda-forge/noarch 40kB | |
+ argon2-cffi 23.1.0 pyhd8ed1ab_0 conda-forge/noarch 19kB | |
+ argon2-cffi-bindings 21.2.0 py310h2372a71_4 conda-forge/linux-64 34kB | |
+ arpack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import numpy | |
import openmm | |
from openff.toolkit import ForceField, Molecule | |
sage = ForceField("openff-2.1.0.offxml") | |
def get_lammps_charges(interchange) -> list[float]: | |
interchange.to_lammps("tmp.lammps") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------- | |
Amber 22 SANDER 2022 | |
------------------------------------------------------- | |
| Run on 06/13/2023 at 15:09:44 | |
| Executable path: sander | |
| Working directory: /Users/mattthompson/software/openff-interchange | |
| Hostname: Unknown |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://easel.inventables.com/projects/L4rEQXSGeTz30COuvKfIlg |
NewerOlder