pele-python / pele

Python energy landscape explorer
Other
94 stars 40 forks source link

Use Charged Molecule with (Charged?) LJ Potentials #171

Open WCEdison opened 5 years ago

WCEdison commented 5 years ago

a question concerning the documentation, I am trying to run simulation on charged lj-potential on charged particle (e.g. H3O) with GUI, though the documentation only cover as much as standard lj potential with GUI, and I am hoping to have example in documentation to call from charged lj potential (if this exists in pele) to run simulation that shows molecules (or at least the disconnectivity graph will change according due to charge even if only molecules are treated as single particle instead of moleules that can show angles between the bonds.

js850 commented 5 years ago

@jdf43 , do you know if there are any examples in Pele with charged particles?

farrelljd commented 5 years ago

@WCEdison @js850 None of which I'm aware, sorry

WCEdison commented 5 years ago

Hi, I wonder if there is any way that i can call or define a potential such that i can run the system with charged particle? As it is not mentioned in the documentations, but I will need a simulation to see the LJ potential and disconnnectivity graph of a charged water molecule. if I have the ways to define it I am happy to see if it builds and provide the result for others.

smcantab commented 5 years ago

@WCEdison as far as I know, currently we do not have an implementation of potentials that supports Ewald or Wolff Summation (necessary for electrostatics), though we used to in one of the earlier implementations. You can write one that fits the current structure of the potentials and contribute it to the library through a pull request, or you can write a wrapper class that inherits from pele.BasePotential and the potential of a library that implements electrostatic interactions. For instance see pele/pele/amber/openmm_potential.py Then as long as you implement the get_energy and get_energy_gradient methods, you should be able to use all other tools from pele.

js850 commented 5 years ago

There are a bunch of examples of how to create a new potential in this folder https://github.com/pele-python/pele/tree/master/examples/new_potential

some information about the System class here: https://github.com/pele-python/pele/blob/master/examples/using_the_system_class/using_the_system_class.py

If you need parallel boundary conditions there is a system class that supports that (to some extent). https://github.com/pele-python/pele/blob/master/pele/systems/blj_bulk.py At the very least you can use that as a starting point.

As @smcantab says, if you do implement new potentials or a new system we would welcome a pull request so others can take advantage of your work.