-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
write_gsd
doesn't work when no mass is set
#678
Comments
It also fails due to |
Makes sense to me. I think the preferred behavior would be to check for I almost think this issue necessitates some hierarchy of mass treatment. We could make a module which gives the many ways to check the mass for a site, and we can specify a given order for the specific writer instance.
|
I agree. I'll just add an extra line that corrects for |
I think that's the easiest fix. Where are you setting the mass from in this instance? |
I came across this issue going form mbuild --> gmso --> gsd file. Ultimatley, using it as a replacement for the gsd writer in mBuild (which uses Parmed) and doesn't populate angles and dihedrals. And since |
I see what you mean, but are you saying that |
I think this conversation is happening in another thread, but certainly if that information is in the mBuild object it should get converted to the GMSO |
About the charge issue, I think that's almost depends on what type of forcefield you are using. Like for oplsaa the charge is tied with the atomtype, but for some others, the atomtype will define the sigma and epsilon, and the charge will be assigned to the site in a separate step. For the first case, though, I can see the scenario where we have the system typed, but then need to make a few tweaks to make it charge-neutral, in which case, I think modifying the site.charge would be better. So, I think site.charge should take precedent to atomtype.charge. |
I think that makes sense also as the default. But I think a specific writer can tie the style to where they want to access the charge. So they can write from site.atomtype.charge as the first precedence. But in terms of converting from mBuild, I think we have to associate with site, as @daico007 says. |
Closed by #680 |
write_gsd
doesn't work if masses aren't set in the topology.It looks like it tries to correct for this case (line 130), but the problem is that
top.site.mass
defaults toNone
if it hasn't been set.This is also related to #664
I think a couple fixes are:
site.mass
to 0 instead of Nonemasses[masses == None] = 1.0
to correct for None massesfrom_*
functions and try to populatesite.mass
correctly when the information is availableNone
masses and throw an error message instructing the user to populate the site massesThe text was updated successfully, but these errors were encountered: