Hi Bartek,
Thank you very much for your response. I included the electric dipole part
of siesta_analysis.F file in siesta_write_forces subroutine (which is a
part of write_subs.F file). I also included the "use m_dipol" statement in
the siesta_write_forces subroutine.

When I try to compile SIESTA code now, it is giving me an error: "Fatal
Error: Can't open module file 'm_dipol.mod' for reading at (1): No such
file or directory".

Did you also get an error like this?

Abhishek

On Sat, Aug 4, 2012 at 2:04 AM, Bartek Szyja <[email protected]> wrote:

> Hi Abishek,
>
> For this purpose I've done very ugly hack of copying the dipole moment
> printing code into the force printing subroutine. I am fully aware that
> it could be done nicely, and would be both - easy and useful, but my
> experience in Fortran is non existent ;) so I need to wait for others to
> do so - if anybody could make a proper patch I'd be the first one to
> apply it before compilation :)
>
> Anyway - my approach was to find the end of siesta_write_forces
> subroutine (around 675-th line of write_subs.F file) and put there the
> part concerning electric dipole from siesta_analysis.F file. I also had
> to add the "use m_dipol" statement. that's all - crude, but worked for
> me.
>
> Cheers,
> Bartek
>
>
>
> On Fri, 2012-08-03 at 17:52 +0200, Abhishek Asthana wrote:
> > Hello,
> >
> > I am using the SIESTA code to observe how dipole moments of various
> > polar organic compounds change during the course of an AIMD
> > simulation. For this purpose, I need to display the dipole moment at
> > each step. I program in fortran-77 and C, but have little experience
> > with fortran-95 and I’m having trouble modifying the code.
> >
> >
> >
> > I have gotten this far: After the last MD step, the siesta.F code
> > calls on siesta_analysis.F, which has a few dipole related piece of
> > code which prints the dipole, and the siesta_analysis.F calls on
> > another code dhscf.F, which probably accepts and updates “dipol”
> > variable. This then probably calls the dipole.F code to calculate
> > dipole.
> >
> >
> >
> > I’m having trouble putting this all together and inferring how to
> > include this dipole moment calculation inside the main loop
> > in siesta.F (which calls on siesta_forces and siesta_move). Can
> > someone help me with this?
> >
> >
> >
> > Thanks!
> >
> > Abhishek
> >
>
>
>

Responder a