Giter Club home page Giter Club logo

Comments (3)

jewettaij avatar jewettaij commented on August 30, 2024

Great question.

Firstly, I'd like to take the opportunity to solicit help. Since I don't run all-atom simulations, I am not very well informed what are the most popular tools for ab initio charge calculation. Is there is a clear favorite tool for this kind of task? (for OPLSAA at least?) If so, it would be nice if there was an automated script that could read the output from this program and convert it to moltemplate format. (Perhaps as a series of "set" commands stored in the "In Charges" section, as discussed below. ...Don't worry about this. I can worry about those details....) But I don't even know what software people use or what kind of file format it returns. If you have suggestions or would like to help automate this process, let me know.

To answer your question: Yes. You can override the the charges in the "oplsaa.lt" file in two ways:

  1. In all of the examples, the "run.in.min", "run.in.nvt" and "run.in.npt" files contain a list of LAMMPS commands. One of them is "include system.in.charges". The OPLSAA charges are saved in a file named "system.in.charges". It contains a long list of "set" commands that set the charge of the atoms according to their atom type. If you don't want to do this, then simply comment out the "include system.in.charges" line from the "run.in.min", "run.in.nvt" and "run.in.npt" files=. In that case it will read the charges stored in the system.data file, which are also the charges in the "Data Atoms" section of each molecule (which are typically 0 in the examples). I should probably make this more clear. Note: If you do this, then LAMMPS will ignore all of the charges in the OPLSAA file, for all of the atoms in all of your molecules./
  2. Alternatively, if you want to use the OPLSAA charges (in the "oplsaa.lt" file) for some of your atoms, and customize the charges for some other atoms, then you can follow this example. I modified the charge of one of the carbon atoms (named "c1") in the "graphene_nh2.lt" file. The other atom's charge was not modified. To modify the charge, I added this section to the "graphene_nh2.lt" file.
  write("In Charges") {
    set atom $atom:c1 charge 0.18  #(This overrides the charge for $atom:c1)
  }

(Note: Any text that appears in the "In XXX" section gets automatically appended to the end of a file which is, by default, named "system.in.XXX". So this text will be appended to the end of the "system.in.charges" file that stores the OPLSAA charges, and because it is appended to the end of that file, it will override those charges.)

I hope this helps.
Thanks, by the way.

Andrew

from moltemplate.

jewettaij avatar jewettaij commented on August 30, 2024

I just modified the README.md
file in the parent directory that contains all of the OPLSAA examples.
Let me know if this explanation helps.

Do you think I should modify all of the README.md files in each OPLSAA example as well? (eg "butane", "ethylene+benzene", ...)

from moltemplate.

jewettaij avatar jewettaij commented on August 30, 2024

I modified all of the README.md files in each OPLSAA example. (eg "butane", "ethylene+benzene", ...) Hopefully everybody will see them now.

I think I am going to close the issue now.
Thanks for reporting it.

If you have time to explain how to calculate the atomic charges, I would love to know more about this. (What software you use.)

from moltemplate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.