Comments (1)
This has been completed at some point:
molecule = Molecule.from_smiles("O")
molecule.generate_conformers(n_conformers=1)
topology = molecule.to_topology()
topology.box_vectors = [4, 4, 4] * unit.nanometer
force_field = ForceField("openff-2.0.0.offxml")
interchange = force_field.create_interchange(topology)
pprint(json.loads(interchange.json()))
{
│ 'positions': {
│ │ 'val': [
│ │ │ [0.006112021207809448, 0.038865670561790466, 0.005890042334794998],
│ │ │ [0.07237835526466369, -0.031162935495376583, -0.0038235086947679517],
│ │ │ [-0.07849037051200866, -0.0077027328312397, -0.002066533826291561]
│ │ ],
│ │ 'unit': 'nanometer'
│ },
│ 'box': {'val': [[4.0, 0.0, 0.0], [0.0, 4.0, 0.0], [0.0, 0.0, 4.0]], 'unit': 'nanometer'},
│ 'topology': '{"aromaticity_model": "OEAroModel_MDL", "constrained_atom_pairs": {}, "box_vectors": [4.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 4.0], "box_vectors_unit": "nanometer", "molecules": [{"name": "", "atoms": [{"atomic_number": 8, "formal_charge": 0, "is_aromatic": false, "stereochemistry": null, "name": "", "metadata": {}}, {"atomic_number": 1, "formal_charge": 0, "is_aromatic": false, "stereochemistry": null, "name": "", "metadata": {}}, {"atomic_number": 1, "formal_charge": 0, "is_aromatic": false, "stereochemistry": null, "name": "", "metadata": {}}], "bonds": [{"atom1": 0, "atom2": 1, "bond_order": 1, "is_aromatic": false, "stereochemistry": null, "fractional_bond_order": null}, {"atom1": 0, "atom2": 2, "bond_order": 1, "is_aromatic": false, "stereochemistry": null, "fractional_bond_order": null}], "properties": {}, "conformers": null, "partial_charges": [-0.834, 0.417, 0.417], "partial_charge_unit": "elementary_charge", "hierarchy_schemes": {}}]}',
│ 'collections': {
│ │ 'Bonds': '{"type": "Bonds", "is_plugin": false, "expression": "k/2*(r-length)**2", "key_map": {"{\\"atom_indices\\": [0, 1], \\"bond_order\\": null}": {"id": "[#8:1]-[#1:2]", "mult": null, "associated_handler": "Bonds", "bond_order": null}, "{\\"atom_indices\\": [0, 2], \\"bond_order\\": null}": {"id": "[#8:1]-[#1:2]", "mult": null, "associated_handler": "Bonds", "bond_order": null}}, "potentials": {"{\\"id\\": \\"[#8:1]-[#1:2]\\", \\"mult\\": null, \\"associated_handler\\": \\"Bonds\\", \\"bond_order\\": null}": {"parameters": {"k": "{\\"val\\": 1087.053566377, \\"unit\\": \\"kilocalorie / angstrom ** 2 / mole\\"}", "length": "{\\"val\\": 0.9716763312559, \\"unit\\": \\"angstrom\\"}"}, "map_key": null}}, "fractional_bond_order_method": "AM1-Wiberg", "fractional_bond_order_interpolation": "linear"}'
│ }
}
from openff-interchange.
Related Issues (20)
- Loading topologies from OpenMM sometimes scrambles atom order HOT 2
- Electrostatics key mismatch after combination HOT 3
- Positions of `MonovalentLonePair` virtual sites is incorrect (does not affect simulations) HOT 1
- Virtual site parameters can clash if looked up using only SMIRKS HOT 4
- `experimental/openmmforcefields/gaff.ipynb` and `ligand_in_water.ipynb` notebooks broken on OpenFF Docs HOT 1
- units for `Interchange.collection['Bonds'].get_system_parameters()` HOT 2
- Support GROMACS's `3fad` virtual sites
- `get_positions_with_virtual_sites` does not collate virtual sites with molecules HOT 1
- Some combinations of Interchanges do not commute HOT 2
- Improved LAMMPS support. HOT 2
- LAMMPS versions prior to 2023.08.02 are incompatible with Interchange, but may be installed with it HOT 2
- Interchange.to_gromacs() creates a topology with far too many atomtypes, which influences GROMACS performance HOT 4
- Syncing topology and `Interchange` attributes
- Easier indexing into collections
- Look into ordering of charge dictionary
- Combining a Sage interchange with one loaded from OpenMM fails because the electrostatics cutoff is not set by the OpenMM importer, but is checked by the `combine` method HOT 1
- GROMACS writer chokes without unique molecule names HOT 5
- `experimental/openmmforcefields/gaff.ipynb` is failing on openff-docs HOT 3
- Dihedrals lost in `Interchange.from_gromacs` HOT 1
- PACKMOL wrapper with >100,000 atoms HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openff-interchange.