Dear all, I've got some help from Scheme mail list. It turns out that the statement omits a argument 'p' in the function call *lattice->cartesian*. It may read like this
(define (eps-func p) > (let* ((p (lattice->cartesian p)) > (x (vector3-x p)) > (y (vector3-y p)) > (z (vector3-z p))) > (if (> (sin(* 2 pi x y z)) 0) > (make dielectric > (epsilon 12)) > (make dielectric > (epsilon 1))))) Sorry to bother everyone. Regards, Simon On Wed, Jul 11, 2012 at 10:33 PM, Simon Huskier <husk...@gmail.com> wrote: > Dear Steven and MPB users, > > Following Dr. Steven's suggestion on the following thread, > http://www.mail-archive.com/mpb-discuss@ab-initio.mit.edu/msg00543.html > > I defined a eps-func as following: > > (define (eps-func p) >> (let* ((p (lattice->cartesian)) >> (x (vector3-x p)) >> (y (vector3-y p)) >> (z (vector3-z p))) >> (if (> sin(* 2 pi x y z) 0) >> (make dielectric >> (epsilon 12)) >> (make dielectric >> (epsilon 1))))) > > > When I run the mpb program, there is an error. > >> *Initializing dielectric function... >> ERROR: Wrong number of arguments to #<procedure lattice->cartesian (x)>* > > > Although the suggestion is obvious (wrong number of arguments), it is > beyond my capability to fix it right now. I checked let* instruction > and lattice->cartesian function, and I also carefully matched the ')'s. > Any suggestion would be appreciated. > > Thanks. > > Best Regards, > > Simon > > >
_______________________________________________ mpb-discuss mailing list mpb-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss