LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Modifying LAMMPS / accessing variable from another fix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Modifying LAMMPS / accessing variable from another fix


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Tue, 11 Jul 2017 06:35:24 -0400



On Tue, Jul 11, 2017 at 4:36 AM, ONOFRIO, Nicolas [AP] <nicolas.onofrio@...6977...> wrote:
Dear LAMMPS users,

We recently introduced EChemDID to equilibrate voltage during reactive MD (by adjusting the electronegativity used for charge equilibration).
The method is detailed in the JCP http://aip.scitation.org/doi/10.1063/1.4927562
I am working on updating our code to make it more consistent with latest LAMMPS versions and also trying to keep LAMMPS's code untouched.

I noticed a new variable (chizj) in the recent version of QEq which is set to zero by default and, added to the electronegativity (chi) then used to optimize charges.
I don't know why this (chizj) variable has been introduced but it looks to me as a variable to include an external potential to the QEq?

​according to the source code management system, the chizj pointer has been included in the QEQ package based class since its inception in ​september 2014.
also, it is set and used in fix qeq/slater. it is not at all present in fix qeq/reax of the USER-REAXC package.
 

I have a fix_echemdid that equilibrates the voltage and I was thinking using chizj to pass the external potential to the QEq.
This would allow echemdid to work directly with QEq regardless of the potential (as long as there is a potential consistent with QEq).
However, I have hard time to access the chizj variable from my fix_echemdid class.

I would like to know
- if I am proceeding the right way. Does it make sense to use chizj to pass an external potential?

​no.​
 
- if yes, what is the best way to access chizj from my echemdid class?

​the common way in LAMMPS to expose internal data to other classes without having to know its particular type ​is through adding an "extract()" method to the class holding the data and adding the corresponding code to it.

axel.
 

Thank you,
Nicolas



www.polyu.edu.hk/80anniversary

Disclaimer:

This message (including any attachments) contains confidential information intended for a specific individual and purpose. If you are not the intended recipient, you should delete this message and notify the sender and The Hong Kong Polytechnic University (the University) immediately. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited and may be unlawful.

The University specifically denies any responsibility for the accuracy or quality of information obtained through University E-mail Facilities. Any views and opinions expressed are only those of the author(s) and do not necessarily represent those of the University and the University accepts no liability whatsoever for any losses or damages incurred or caused to any party as a result of the use of such information.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...6297....sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...12...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.