You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/faq.md
+64Lines changed: 64 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,9 @@
3
3
## Getting Started
4
4
5
5
:::::{faq-entry} What do I need to know to get started?
6
+
---
7
+
name: faq-get-started
8
+
---
6
9
7
10
OpenFF tools follow a philosophy of failing with a descriptive error message rather than trying to interpret intention from ambiguous information, so you
8
11
might find you have to provide more information than you're used to.
@@ -12,6 +15,9 @@ Once you're ready to start coding, check out [](install.md) and [](examples.md).
12
15
:::::
13
16
14
17
:::::{faq-entry} What kinds of input files can I apply SMIRNOFF parameters to?
18
+
---
19
+
name: faq-input-files
20
+
---
15
21
16
22
SMIRNOFF force fields use direct chemical perception meaning that, unlike many molecular mechanics (MM) force fields, they apply parameters based on substructure searches acting directly on molecules.
17
23
This creates unique opportunities and allows them to encode a great deal of chemistry quite simply, but it also means that the *starting point* for parameter assignment must be well-defined chemically, giving not just the elements and connectivity for all of the atoms of all of the components of your system, but also providing the formal charges and bond orders.
@@ -31,6 +37,9 @@ A force field which uses the chemical identity of molecules to assign parameters
31
37
:::::
32
38
33
39
:::::{faq-entry} Can I use an Amber or GROMACS topology/coordinate file as a starting point for applying a SMIRNOFF force field?
40
+
---
41
+
name: faq-amber-gmx-top
42
+
---
34
43
35
44
Amber and GROMACS topologies and coordinate files do not include enough explicit chemical information to apply a SMIRNOFF force field.
36
45
For example, bond orders are not present in either format; one could infer bond orders based on bond lengths, or attempt to infer bond orders from force constants, but such inference work would be error-prone and is outside the scope of SMIRNOFF.
@@ -43,6 +52,9 @@ Amber and GROMACS topology and coordinate files can be [experimentally loaded] b
43
52
:::::
44
53
45
54
:::::{faq-entry} Can I use an Amber force field with SMIRNOFF ligands?
55
+
---
56
+
name: faq-amber-ff
57
+
---
46
58
47
59
Experimental support for this approach is available through Interchange. Briefly, the ligands are parametrized in the usual SMIRNOFF way to produce an Interchange, the Amber components are parametrized through OpenMM and then loaded into a second Interchange with [`Interchange.from_openmm()`], and then the two Interchanges are combined.
48
60
@@ -51,6 +63,9 @@ Experimental support for this approach is available through Interchange. Briefly
51
63
:::::
52
64
53
65
:::::{faq-entry} What about starting from a PDB file?
66
+
---
67
+
name: faq-pdb
68
+
---
54
69
55
70
PDB files are a ubiquitous coordinate format, but the interpretation of the chemistry of a given PDB file is ambiguous in many ways.
56
71
Without a complete and accurate chemical description of the system, SMIRNOFF parameters cannot be applied.
@@ -72,12 +87,18 @@ Given a PDB file of a hypothetical biomolecular system of interest containing a
72
87
:::::
73
88
74
89
:::::{faq-entry} What about starting from an XYZ file?
90
+
---
91
+
name: faq-xyz
92
+
---
75
93
76
94
XYZ files generally only contain elements and positions, and are therefore similar in content to PDB files. See the above section "What about starting from a PDB file?" for more information.
77
95
78
96
:::::
79
97
80
98
:::::{faq-entry} What do you recommend as a starting point?
99
+
---
100
+
name: faq-recommended-starting-point
101
+
---
81
102
82
103
For application of SMIRNOFF force fields, we recommend that you begin your work with formats which provide the chemical identity of your small molecule (including formal charge and bond order).
83
104
This means we recommend one of the following or equivalent:
@@ -92,6 +113,9 @@ Essentially, anything which provides the full identity of what you want to simul
92
113
:::::
93
114
94
115
:::::{faq-entry} How can I transfer my prepared system to HPC resources for simulation?
116
+
---
117
+
name: faq-hpc
118
+
---
95
119
96
120
OpenFF recommends exporting a prepared `Interchange` to the target MD engine and using the MD engine's recommended method to transfer it to HPC resources. This way, no additional dependencies need to be installed on the HPC resource to use OpenFF tools during preparation. For most MD engines, simply transfer the files produced by the appropriate [`Interchange.to_*()`] methods. For OpenMM, create a `System` Python object with [`Interchange.to_openmm_system()`] or [`ForceField.create_openmm_system()`] and transfer it by [serializing to XML].
97
121
@@ -104,6 +128,9 @@ OpenFF recommends exporting a prepared `Interchange` to the target MD engine and
104
128
## Errors and Performance Issues
105
129
106
130
:::::{faq-entry} Why does partial charge assignment fail during conformer generation, even though my molecule has conformers?
131
+
---
132
+
name: faq-charge-conformers
133
+
---
107
134
108
135
Assigning partial charges with a quantum chemical method requires conformers, as they are an essential input to a quantum chemical calculation.
109
136
Because the charges assigned by a SMIRNOFF force field should be transferrable between systems, we default to generating our own set of conformers during charge assignment.
:::::{faq-entry} I'm getting stereochemistry errors when loading a molecule from a SMILES string.
174
+
---
175
+
name: faq-stereochemistry-errors-from-smiles
176
+
---
147
177
148
178
By default, the OpenFF Toolkit throws an error if a molecule with undefined stereochemistry is loaded. This is because the stereochemistry of a molecule may affect its partial charges, and assigning parameters using [direct chemical perception](https://pubs.acs.org/doi/pdf/10.1021/acs.jctc.8b00640) may require knowing the stereochemistry of chiral centers. In addition, coordinates generated by the Toolkit for undefined chiral centers may have any combination of stereochemistries; the toolkit makes no guarantees about consistency, uniformity, or randomness. Note that the main-line OpenFF force fields currently use a stereochemistry-dependent charge generation method, but do not include any other stereospecific parameters.
149
179
@@ -152,6 +182,9 @@ This behavior is in line with OpenFF's general attitude of requiring users to ex
152
182
:::::
153
183
154
184
:::::{faq-entry} Parameterizing my system, which contains a large molecule, is taking forever. What's wrong?
185
+
---
186
+
name: faq-slow-parametrization
187
+
---
155
188
156
189
The mainline OpenFF force fields use AM1-BCC to assign partial charges (via the `<ToolkitAM1BCCHandler>` tag in the OFFXML file). This method unfortunately scales poorly with the size of a molecule and ligands roughly 100 atoms (about 40 heavy atoms) or larger may take so long (i.e. 10 minutes or more) that it seems like your code is simply hanging indefinitely. If you have an OpenEye license and OpenEye Toolkits [installed](installation/openeye), the OpenFF Toolkit will instead use `quacpac`, which can offer better performance on large molecules. Otherwise, it uses AmberTools' `sqm`, which is free to use.
157
190
@@ -160,6 +193,9 @@ In the future, the use of AM1-BCC in OpenFF force fields may be replaced with me
160
193
:::::
161
194
162
195
:::::{faq-entry} How can I silence warnings I'm expecting my code to generate?
196
+
---
197
+
name: faq-warnings
198
+
---
163
199
164
200
OpenFF libraries often issue warnings when they detect that the user might be doing something they don't intend. These warnings are largely borne out of bug reports from users, and we'd rather make sure new users understand our software, so they can get noisy for experienced developers. We use the Python [`warnings`] module from the standard library, so warnings can be filtered from a particular section of code like so:
165
201
@@ -172,11 +208,15 @@ with warnings.catch_warnings():
172
208
)
173
209
174
210
Molecule.from_smiles("[H:1][O:4][H:2]")
211
+
```
175
212
:::::
176
213
177
214
## Installation Issues
178
215
179
216
:::::{faq-entry} I'm having troubles installing the OpenFF Toolkit on my Apple Silicon Mac.
217
+
---
218
+
name: faq-apple-silicon
219
+
---
180
220
181
221
As of August 2022, some upstreams (at least AmberTools, possibly more) are not built on `osx-arm64`, so installing the OpenFF stack is only possible with [Rosetta]. See the [platform support] section of the installation documentation for more.
182
222
@@ -188,6 +228,9 @@ As of August 2022, some upstreams (at least AmberTools, possibly more) are not b
188
228
:::::
189
229
190
230
:::::{faq-entry} My mamba/conda installation of the toolkit doesn't appear to work. What should I try next?
231
+
---
232
+
name: faq-conda-install-broken
233
+
---
191
234
192
235
We recommend that you install the toolkit in a fresh environment, explicitly passing the channels to be used, in-order:
193
236
@@ -202,6 +245,9 @@ Taking the approach that conda/mamba environments are generally disposable, even
202
245
:::::
203
246
204
247
:::::{faq-entry} My mamba/conda installation of the toolkit STILL doesn't appear to work.
248
+
---
249
+
name: faq-conda-install-broken-contd
250
+
---
205
251
206
252
Many of our users encounter issues that are ultimately due to their terminal finding a different `conda` at higher priority in their `PATH` than the `conda` deployment where OpenFF is installed. To fix this, find the conda deployment where OpenFF is installed. Then, if that folder is something like `~/miniconda3`, run in the terminal:
207
253
@@ -216,6 +262,9 @@ and then try rerunning and/or reinstalling the Toolkit.
216
262
## Under the Hood
217
263
218
264
:::::{faq-entry} How are partial charges assigned in a SMIRNOFF force field?
265
+
---
266
+
name: faq-partial-charges
267
+
---
219
268
220
269
There are [many charge methods](https://openforcefield.github.io/standards/standards/smirnoff/#partial-charge-and-electrostatics-models) supported by the SMIRNOFF specification. With the exception of water, mainline OpenFF force fields only use AM1-BCC (through `ToolkitAM1BCC`) to assign partial charges. (A future biopolymer force field will likely use library charges for standard residues.)
221
270
@@ -230,6 +279,9 @@ A future charge method may use [NAGL](https://github.com/openforcefield/openff-n
230
279
:::::
231
280
232
281
:::::{faq-entry} I understand the risks and want to perform bond and formal charge inference anyway
282
+
---
283
+
name: faq-chemical-inference
284
+
---
233
285
234
286
If you are unable to provide a molecule in the formats recommended above and want to attempt to infer the bond orders and atomic formal charges, there are tools available elsewhere that can provide guesses for this problem. These tools are not perfect, and the inference problem itself is poorly defined, so you should review each output closely (see our [Core Concepts](users/concepts) for an explanation of what information is needed to construct an OpenFF Molecule). Some tools we know of include:
235
287
@@ -240,6 +292,9 @@ If you are unable to provide a molecule in the formats recommended above and wan
240
292
:::::
241
293
242
294
:::::{faq-entry} The partial charges generated by the toolkit don't seem to depend on the molecule's conformation! Is this a bug?
295
+
---
296
+
name: faq-charges-conformation-independent
297
+
---
243
298
244
299
No! This is the intended behavior. The force field parameters of a molecule should be independent of both their chemical environment and conformation so that they can be used and compared across different contexts. When applying AM1BCC partial charges, the toolkit achieves a deterministic output by ignoring the input conformation and producing several new conformations for the same molecule. Partial charges are then computed based on these conformations. This behavior can be controlled with the `use_conformers` argument to [Molecule.assign_partial_charges()](openff.toolkit.topology.Molecule.assign_partial_charges).
245
300
@@ -248,6 +303,9 @@ No! This is the intended behavior. The force field parameters of a molecule shou
248
303
## SMIRNOFF Force Fields
249
304
250
305
:::::{faq-entry} How can I distribute my own force fields in SMIRNOFF format?
306
+
---
307
+
name: faq-distribute-smirnoff
308
+
---
251
309
252
310
We support conda data packages for distribution of force fields in `.offxml` format! Just add the relevant entry point to `setup.py` and distribute via a conda (or PyPI) package:
253
311
@@ -264,6 +322,9 @@ Where `get_my_new_force_field_paths` is a function in the `my_package` module pr
264
322
:::::
265
323
266
324
:::::{faq-entry} What does "unconstrained" mean in a force field name?
325
+
---
326
+
name: faq-unconstrained-ff
327
+
---
267
328
268
329
Each release of an [OpenFF force field](https://github.com/openforcefield/openff-forcefields/tree/main/openforcefields/offxml) has two associated `.offxml` files: one unadorned (for example, `openff-2.0.0.offxml`) and one labeled "unconstrained" (`openff_unconstrained-2.0.0.offxml`). This reflects the presence or absence of holonomic constraints on hydrogen-involving bonds in the force field specification.
269
330
@@ -286,6 +347,9 @@ Starting with v2.0.0 (Sage), TIP3P water is included in OpenFF force fields. The
286
347
:::::
287
348
288
349
:::::{faq-entry} How do I add or remove constraints from my own force field?
350
+
---
351
+
name: faq-add-remove-constraints
352
+
---
289
353
290
354
To make applying or removing bond constraints easy, constrained force fields released by OpenFF always include full bond parameters. Constraints on Hydrogen-involving bonds inherit their lengths from the harmonic parameters also included in the force field. To restore the harmonic treatment, simply remove the appropriate constraint entry from the force field.
0 commit comments