Comments (3)
My current hacky workaround:
def to_interchange(ff, top):
inter = openff.interchange.Interchange.from_smirnoff(ff, top)
for col_k, col_v in inter.collections.items():
for pot_k, pot_v in col_v.potentials.items():
if " " not in pot_k.id:
handler = ff[pot_k.associated_handler]
param = handler[pot_k.id]
else:
smirks, lp, match = pot_k.id.split(" ")
handler = ff["VirtualSites"]
(param,) = handler.get_parameter(
{"smirks": smirks, "name": lp, "match": match}
)
if not hasattr(param, "_cosmetic_attribs"):
continue
for attr in param._cosmetic_attribs:
pot_v.parameters[attr] = getattr(param, f"_{attr}")
return inter
from openff-interchange.
Seems fair, I don't use cosmetic attributes so this never occurred to me.
I figure the last loop in that block of code should do the trick, and having it turned on by default makes sense
from openff-interchange.
@SimonBoothroyd Looking at this more closely now - does it make sense to have it on the Potential
or PotentialKey
object? Right now Potential.parameters
really only stores the stuff that describes the physics of the interaction, whereas i.e. stuff like parameterize_eval
shoved in for ForceBalance's accounting seem like things that better live on pointers to those objects. I'm not sure if such a physics vs. bookkeeping distinction holds for other use cases.
from openff-interchange.
Related Issues (20)
- Support writing to file-like objects
- `ligand_in_water/ligand_in_water.ipynb` example is failing on openff-docs HOT 2
- JSON roundtrip doesn't work with `from_openmm` generated system HOT 2
- `from_openmm` doesn't take `System` masses HOT 3
- Bond information is silently lost in openmm roundtrip for constrained systems HOT 5
- Document known limitations of `Interchange.from_openmm`
- ENH and/or DOC: Better handling of atoms with resindex 0 in GROMACSAtom HOT 6
- Improve GROMACS export speed HOT 18
- Unique atom types in LAMMPS. HOT 6
- Improve handling of residue IDs/numbers in GROMACS files HOT 7
- Add basic performance tests
- GROMACS export crashes due to non-bonded lookup failures when virtual sites are present in some topologies HOT 2
- GROMACS Residue IDs not incremented when writing multiple copies of a unique molecule
- Status of vacuum simulations in GROMACS HOT 5
- Loosing Gromacs atom name details when using an OpenMM topology HOT 5
- Protein water systems HOT 1
- Add `Interchange.to_amber`
- PACKMOL wrapper with >100,000 atoms HOT 6
- Make `Interchange.topology` required? HOT 1
- LAMMPS atom writer makes assigning unique IDs to chemically-identical molecules impossible HOT 3
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.