Git Product home page Git Product logo

Comments (5)

RudolfWeeber avatar RudolfWeeber commented on May 24, 2024

@KonradBreitsprecher: Is this still broken?

from espresso.

arnolda avatar arnolda commented on May 24, 2024

Well, there are no further relevant commits on ELC after the Aug 2014 fixes, so I would say yes.

from espresso.

KonradBreitsprecher avatar KonradBreitsprecher commented on May 24, 2024

So I digged into this again, the following script sometimes fails and sometimes works, even though p3m tunes to the same values. Note that in the current branch, the dielectric contrast feature is not interfaced.


import numpy as np
import espressomd
from espressomd.electrostatics import P3M, P3M_GPU
from espressomd import electrostatic_extensions

S = espressomd.System()
box_l = 10.0
bl2 = box_l/2.0
elc_gap = 5.0
box_z = box_l+elc_gap
S.box_l = [box_l, box_l, box_z]
S.time_step = 0.001
S.cell_system.skin=0.4

d=0.8
S.part.add(pos = [bl2, bl2, box_l-d], q = 1, fix = [1,1,1])
S.part.add(pos = [bl2, bl2/2.0, bl2], q = -0.5, fix=[1,1,1])
S.part.add(pos = [bl2, bl2*3.0/2.0, bl2], q = -0.5, fix=[1,1,1])
p3m = P3M(bjerrum_length=1.0, accuracy=1e-3)
elc = electrostatic_extensions.ELC(gap_size = elc_gap, maxPWerror = 1e-4, di_mid_top = 1000, di_mid_bot = 1000)
S.actors.add(p3m)
S.actors.add(elc)

n=100
ret = []
for i in range(n):
    z= box_l-d - 1.0*i/n*(box_l-2*d)
    S.part[0].pos = [bl2, bl2, z]
    S.integrator.run(0)
    ret.append([z, S.part[0].f[2]])
np.savetxt("elc.dat", ret)
                                             

Wrong:
image
Correct:
image

from espresso.

RudolfWeeber avatar RudolfWeeber commented on May 24, 2024

@KonradBreitsprecher is this resolved?

from espresso.

KonradBreitsprecher avatar KonradBreitsprecher commented on May 24, 2024

Yes! Is tested and can be closed via #1638

from espresso.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.