jewettaij / moltemplate

A general cross-platform tool for preparing simulations of molecules and complex molecular assemblies
http://www.moltemplate.org
MIT License
244 stars 95 forks source link

question about choosing OPLSAA @atom types (atomic charge) #54

Closed ysdlucky closed 3 years ago

ysdlucky commented 3 years ago

Hello! I created a chain of polyvinyl alcohol for all-atoms MD simulation. I choosed the atom 96 and 97 as oxygen and hydrogen atoms of hydroxyl in OPLSAA. Their charges are -0.683 and 0.418.This is not electrically neutral .Is this because I chose the wrong atom type? Or I need to use another tool to calculate atomic charges?

Thank you!

jewettaij commented 3 years ago

Yes. At least one of your @atom types is wrong. But I'm not sure its the oxygen or hydrogen atom. You also have to consider changing the @atom type of the atoms they are bonded to (such as the carbon).

For the carbon atom which is bonded to the OH group, why don't you change it to type @atom:100? That matches the description, and if you use @atom:85 for the hydrogen atom that's bonded to it, then (if I didn't mess up my arithmetic) each monomer in the polymer becomes neutral.

I will go ahead and close this github issue, admitting that the general issue of how to choose @atom types correctly remains a thorny and unresolved one. There are some automated tools to infer these types, but I wonder if they work well. Sometimes, there is not exact match for the atom you want to place, and you just have to pick the atom type which most closely matches the description (after checking the mass to confirm the element type), and then use a 3rd party tool to calculate the charge of the whole system. Fortunately, in this simple example, I don't think you need to do that.

jewettaij commented 3 years ago

I received a github notification from this user (ALEXysd) regarding a followup comment. It might not be visible to the public, so I included it below, along with my reply:

"I appreciate your help very much! I choosed the wrong atom types of carbon. And I have solved my problem now.There is another small question.When I read file _“README.md” to find a way to choose correct atoms type yesterday, the chapter of“ ### Limitations for preparing all-atom simulations it” says “some suggestions for selecting the appropriate atom types for your molecules are provided here.“ However,this website couldn‘t be open."

Hi ALEXysd (Coin). That link works for me. According to the service I used, it is also available in China. Perhaps the web-site was down temporarily. Or, perhaps your web-browser is objecting to the lack of https in the URL? Try replacing the "http://" with "https://"

https://moltemplate.org/force_field_recommendations.html

(In response to your question, I modified the README.md file to use "https://", and will upload it with the next github commit. Thanks for pointing this issue out.)

I admit that I'm not sure if this is a helpful web page. Meanwhile, I attached the contents of that file so that you can read it: recommendations_force_fields_moltemplate_2021-6-30.zip

ysdlucky commented 3 years ago

Thank you! It works now. When I click the link in the file _“README.md” , my web-browser turns to "http://moltemplate.org/force_field_recommendations.html)." rather than "http://moltemplate.org/force_field_recommendations.html".
There is extra “).”. This is why I can't open this website.I should have checked this .I am too careless . Thank you for your suggestions and answers ! Best wishes to you! .

jewettaij commented 3 years ago

Thanks for your reply. I'm glad it's working. Best wishes to you too.