How to move a particle in a VMC calculation

Mechdude
Messages
108
Reaction score
1

Homework Statement



im trying to get concept of moving a particle in a Variational Monte Carlo calcualation and i still haven't a clue on how to do that, all i get are really bad acceptance ratios

Homework Equations


Here is my code:
Code:
def VMC(WF,numSteps):
        EnergyList=[]  #### 
        R=numpy.zeros((2,3),float)   ### positions of two particles
        movesAttempted=0.0
        movesAccepted=0.0
        print "num-steps: ",numSteps
        for i in range(numSteps):  #####
                OldPos= R.copy()
                oldWfc= WF.WaveFunction(R)
                for ptcl in xrange(0,len(R)):                    #### looping over the partices
                        R[ptcl] = numpy.add( R[ptcl],numpy.random.rand(3)*1.5) ## new pos?
                newWfc= WF.WaveFunction(R)            
                ratio = (newWfc**2/oldWfc**2)
                rander = numpy.random.rand(1)
                if ratio > rander:
                        Eloc = WF.LocalEnergy(R)
                        EnergyList.append(Eloc)
                        movesAttempted+=1
                        movesAccepted+=1
                else:
                        movesAttempted+=1
                        R = OldPos                       # restore old R , we rejected a move here
        print "movesAcepted: ",  movesAccepted, ",   movesAttempted: ", movesAttempted
        print "Acceptance Ratio", movesAccepted/movesAttempted
        return EnergyList

How is the move algorith done? I'm trying to follow the school here:
http://cms.mcc.uiuc.edu/pimcpp/index.php/VMC_Tutorial

Thanks.
 
Physics news on Phys.org
The Attempt at a SolutionI think the idea of the move algorithm is to pick a random displacement for the particle (which in this case is a vector in 3D space) and then calculate the ratio between the new wavefunction and the old wavefunction. If the ratio is greater than a randomly chosen number (rander) then the move is accepted, otherwise it is rejected.
 
Hi, I had an exam and I completely messed up a problem. Especially one part which was necessary for the rest of the problem. Basically, I have a wormhole metric: $$(ds)^2 = -(dt)^2 + (dr)^2 + (r^2 + b^2)( (d\theta)^2 + sin^2 \theta (d\phi)^2 )$$ Where ##b=1## with an orbit only in the equatorial plane. We also know from the question that the orbit must satisfy this relationship: $$\varepsilon = \frac{1}{2} (\frac{dr}{d\tau})^2 + V_{eff}(r)$$ Ultimately, I was tasked to find the initial...
The value of H equals ## 10^{3}## in natural units, According to : https://en.wikipedia.org/wiki/Natural_units, ## t \sim 10^{-21} sec = 10^{21} Hz ##, and since ## \text{GeV} \sim 10^{24} \text{Hz } ##, ## GeV \sim 10^{24} \times 10^{-21} = 10^3 ## in natural units. So is this conversion correct? Also in the above formula, can I convert H to that natural units , since it’s a constant, while keeping k in Hz ?

Similar threads

Replies
1
Views
4K
Replies
2
Views
2K
Back
Top