[QE-developers] A question concerning a QE development

Layla Martin-Samos lmartinsamos at gmail.com
Fri May 28 08:58:12 CEST 2021


Dear Laurent, plugin_ext_forces is a routine that is meant for easy
patching of third-party plugins that read their own input. As such it has
to be kept empty in the QE trunk. In addition it allows users to implement
their own "exotic" constraint in their local copy. For your add-on you can
always construct it as a pathchable plugin reading its own input. For that
you only need to encapsulate your routines in a lib and construct a patch
that patches plugin_ext_forces and make.inc (to add the path to your lib).
To turn on the use of your plugin you can look at the other *_plugin_*.f90
routines.

If you and the coordinators and maintainers of QE consider that your add-on
might be of broad interest, then you can always follow the path of full
integration with QE. In this case, I strongly recommend you to add your
routine that modifies forces BEFORE the call to the empty routine
plugin_ext_forces. Like this your add-on will be fully compatible with
PLUMED plugin and other third-party plugins that patch plugin_ext_forces.

Cheers

Layla

Le ven. 28 mai 2021 à 07:06, laurent pizzagalli <
laurent.pizzagalli at univ-poitiers.fr> a écrit :

> Dear Paolo,
>
> thanks for your help. I didn't think of the external file, which is
> probably the most flexible option. The ATOMIC_FORCES card seems a well
> defined container, and I am not sure it would be a good idea to
> introduce keywords in that place. Therefore the best way IMO would be to
> define a keyword in the &SYSTEM namelist, allowing for the activation of
> an external force field. The required parameters would then be read from
> an external file.
>
> Best regards
>
> Laurent
>
> On 27/05/2021 22:04, Paolo Giannozzi wrote:
> > Dear Laurent
> >
> > the proliferation of input variables in QE is an old and known
> > problem. I am not sure what the best solution should be, though. One
> > possibility I would consider is to read the needed variables from a
> > separate file.
> > If I remember correctly this is what the "Environ" library does.
> > Another one is to extend the existing ATOMIC_FORCES card, that
> > currently supports only a list of forces, to cover your case as well.
> >
> > Paolo
> >
> > On 27/05/2021 10:00, Laurent Pizzagalli wrote:
> >> Dear Dr. Giannozzi,
> >>
> >>
> >> I write to you concerning the implementation of an external force
> >> field in quantum espresso. The motivation is the investigation of the
> >> mechanical properties of nanoparticles, especially in the plastic
> >> regime, obtained by uniaxial compression. The implementation is not
> >> complicated, since you (the developers) had already planned this
> >> potentiality in the file 'plugin_ext_forces.f90'.
> >> Actually, i already made the implementation in cp.x, but in a quick
> >> way, in a local copy of the code. Since it is successful, I would
> >> like to do it properly, merging it with the development version using
> >> git. I got almost all the information I need in the developer manual.
> >> But I still have one question, concerning the general organization of
> >> the input. Right now, I implemented only one kind of force field,
> >> fully repulsive. It allows for compressing the nanoparticle between
> >> two planes. Six keywords are needed, one for the activation of the
> >> force field, four to define the position of the planes and the
> >> increment for their displacements at each timestep, and a last one to
> >> define the strength of the repulsion. My question is: what would be
> >> the best way to organize these keywords? Originally, I put all of
> >> these into the &IONS namelist. Another option would be in the &SYSTEM
> >> namelist. And finally, maybe it would be better to create a specific
> >> NAMELIST to include these keywords (something like &EXTFF)? I also
> >> plan to implement another force field (including an attractive
> >> interaction), which would require other keywords. So the creation of
> >> a specific NAMELIST seems the best option in my opinion. But I would
> >> like to have yours before proceeding.
> >>
> >> Best regards
> >>
> >> Laurent
> >>
> >
>
> --
>                                                        ,,,     __,
>                                                       /'^'\   |__|
>                                                      ( o o )  |
> --------------------------------------------------oOOO--(_)--OO|o------
> <Laurent.Pizzagalli at univ-poitiers.fr>
> http://laurent.pizzagalli.free.fr/            Tel +33 549 49 74 99
> ------------------------------------------    Fax +33 549 49 66 92
> Institut P'
> Departement de Physique et de Mécanique des Matériaux
> CNRS UPR 3346
> Université de Poitiers
> SP2MI
> TSA 41123                                          .oooO
> 86073 Poitiers Cedex 9, FRANCE                     (   )   Oooo.
> ----------------------------------------------------\ (----(   )-------
>                                                      \_)    ) /
>                                                            (_/
>
> _______________________________________________
> developers mailing list
> developers at lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20210528/e36bdca2/attachment.html>


More information about the developers mailing list