Comments (6)
In mBuild when saving as .hoomdxml, .gsd, and .lammpsdata the save
function is calling internal save_hoomdxml
, save_gsd
, and save_lammpsdata
writers that actually take a ParmEd structure as an argument rather than an mBuild Compound (this conversion is performed within mBuild prior to calling the individual writers). So it should be easy to support saving ParmEd structures in these formats. However, in the long term what we would like to do is to add the save_hoomdxml
, save_gsd
, and save_lammpsdata
functions to ParmEd, so that ParmEd is handling all of the saving. These are only incorporated into mBuild right now because ParmEd does not have writers for these file formats. I'm sure @ctk3b has a vision for how we should handle this in the short term, but it might be time for us to work on actually adding these writers into ParmEd
from foyer.
I think adding the writers into ParmEd makes the most sense long term but short term would it be easier to copy writing code from mbuild or import the mbuild save_hoomdxml
function?
from foyer.
My mistake, the functions are write_hoomdxml
, write_gsd
, and write_lammpsdata
.
As @mikemhenry suggested, these can be imported by using:
from mbuild.formats.hoomdxml import write_hoomdxml
from mbuild.formats.gsdwriter import write_gsd
from mbuild.formats.lammpsdata import write_lammpsdata
These functions are not currently included in the mBuild documentation, but we have actually been working on updating the documentation today, so I can make sure that soon information is available for those functions so you will know what arguments to pass.
from foyer.
Thanks! @evanmiller326 and I are presenting mbuild and foyer to our lab today and hoomd is pretty critical to our workflow.
from foyer.
Okay for now then (since we won't have the docs updated for a bit) it would probably be best to look at the source code for mBuild (in the formats
directory). The writers are pretty well documented there, so that should give you an idea of what arguments you will need to pass to them.
from foyer.
I'm gonna close this now but for the record the straightforward way to access these writers is with Compound.save
E.g.
ethane.save('ethane.hoomdxml', forcefield_name='oplsaa')
ethane.save('ethane.hoomdxml', forcefield_files='my_ff.xml')
from foyer.
Related Issues (20)
- Add more precision to the standard XMLs
- Incorrect handling of partially typed systems in general_forcefield.py HOT 1
- Edge case when scaling factors are 0 HOT 1
- Getting an error when using Porebuilder and foyer/mbuild, maybe in the box vectors. HOT 1
- Windows built is failing HOT 1
- Parametrized structure has non-zero charge. HOT 1
- ParmEd residue matching assumes ordered residues
- Atom typing triangular water fails HOT 3
- Improper dihedral coefficients in oplsaa.xml HOT 7
- The General Forcefield will not work with GMSO dev branch. HOT 1
- Foyer not working when installed using `conda` but works with `mamba` HOT 4
- Dihedrals not found HOT 13
- deep copy in nbfix doesn't preserve all structure attributes
- CI stops running because tests are using too much memory. #1090
- Update Github action
- Failed Docker build HOT 1
- Error when foyer is imported HOT 9
- Failing CI tests on main
- Question on Retaining Manual Atomtype Modifications Post apply Method in Foyer HOT 2
- Sigma value for alcohol hydrogen in OPLSAA xml HOT 1
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 foyer.