Skip to content

Issues in python code #10

@aromanro

Description

@aromanro

Hi,

Related with the previous bug report, I was looking over this page:
http://compphysics.github.io/ComputationalPhysics2/doc/pub/vmc/html/vmc-bs.html

I noticed some issues in the python code. I think that the gradient optimization code for the two non interacting particles case should accumulate the DeltaPsi value, so instead of:

        DeltaE = LocalEnergy(PositionOld,alpha)
        DeltaPsi = DerivativeWFansatz(PositionOld,alpha)
        energy += DeltaE
        DerivativePsiE += DeltaPsi*DeltaE

should be something like:

        DeltaE = LocalEnergy(PositionOld,alpha)
        val = DerivativeWFansatz(PositionOld,alpha)
        DeltaPsi += val
        energy += DeltaE
        DerivativePsiE += val*DeltaE

Also the computation of the GreensFunction looks suspicious at a very superficial look, as there, for example, it should be a division with the TimeStep.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions