To do this I put the ddscat program, and ddscat.par file in a new directory. When I run the program it generates the mtable, qtable, qtable2 and target.out files, but not any .avg, .fml or .sca files. The qtable extinction data is empty. When executing, the program appears to make it through the 100 iterations, but then closes out after. The problem seems to be related to the aeff and/or the shape parameters. When I make the aeff too small or the shape parameters too large, then I get the problem as I described. I have been trying to keep the shape parameters large enough to have ~10000 dipoles. But if I set the aeff to match my experimental samples, then the program doesn't generate extinction data (it does seem to work for much larger aeff sizes).

Below is an example of a .par file that I have been using for a gold rod with dimensions L=37 nm (including end caps) and d=7 nm. Therefore the aeff for this geometry is 0.0068 microns. I tried to make the shape parameters a multiple of 2 (60 x 14), to get over 10000 dipoles.

I have tried this on the Windows precompiled version, as well as on a Linux system with the latest version. I would be tremendously grateful if you could give me any insight on what I might be doing wrong.

' ========== Parameter file for v7.3 ==================='

' Preliminaries '

'NOTORQ' = CMDTRQ*6 (DOTORQ, NOTORQ) — either do or skip torque calculations

'PBCGS2' = CMDSOL*6 (PBCGS2, PBCGST, GPBICG, QMRCCG, PETRKP) — CCG method

'GPFAFT' = CMETHD*6 (GPFAFT, FFTMKL) — FFT method

'GKDLDR' = CALPHA*6 (GKDLDR, LATTDR, FLTRCD) — DDA method

'NOTBIN' = CBINFLAG (NOTBIN, ORIBIN, ALLBIN) — binary output?

' Initial Memory Allocation '

100 100 100 = dimensioning allowance for target generation

' Target Geometry and Composition '

'CYLNDRCAP' = CSHAPE*9 shape directive

60 14 = shape parameters 1 - 2

1 = NCOMP = number of dielectric materials

'../diel/Au_evap' = file with refractive index 1

' Additional Nearfield calculation? '

0 = NRFLD (=0 to skip nearfield calc., =1 to calculate nearfield E)

0.0 0.0 0.0 0.0 0.0 0.0 (fract. extens. of calc. vol. in -x,+x,-y,+y,-z,+z)

' Error Tolerance '

1.00e-5 = TOL = MAX ALLOWED (NORM OF |G>=AC|E>-ACA|X>)/(NORM OF AC|E>)

' Maximum number of iterations '

100 = MXITER

' Integration limiter for PBC calculations '

1.00e-2 = GAMMA (1e-2 is normal, 3e-3 for greater accuracy)

' Angular resolution for calculation of <cos>, etc. '

0.5 = ETASCA (number of angles is proportional to [(3+x)/ETASCA]^2 )

' Wavelengths (micron) '

0.650 0.650 1 'LIN' = wavelengths (1st,last,howmany,how=LIN,INV,LOG,TAB)

' Refractive index of ambient medium '

1.333 = NAMBIENT

' Effective Radii (micron) '

0.0068 0.0068 1 'LIN' = eff. radii (1st,last,howmany,how=LIN,INV,LOG,TAB)

' Define Incident Polarizations '

(0,0) (1.,0.) (0.,0.) = Polarization state e01 (k along x axis)

1 = IORTH (=1 to do only pol. state e01; =2 to also do orth. pol. state)

' Specify which output files to write '

0 = IWRKSC (=0 to suppress, =1 to write ".sca" file for each target orient.

' Specify Target Rotations '

0. 0. 1 = BETAMI, BETAMX, NBETA (beta=rotation around a1)

0. 0. 1 = THETMI, THETMX, NTHETA (theta=angle between a1 and k)

0. 0. 1 = PHIMIN, PHIMAX, NPHI (phi=rotation angle of a1 around k)

' Specify first IWAV, IRAD, IORI (normally 0 0 0) '

0 0 0 = first IWAV, first IRAD, first IORI (0 0 0 to begin fresh)

' Select Elements of S_ij Matrix to Print '

9 = NSMELTS = number of elements of S_ij to print (not more than 9)

11 12 21 22 31 33 44 34 43 = indices ij of elements to print

' Specify Scattered Directions '

'LFRAME' = CMDFRM (LFRAME, TFRAME for Lab Frame or Target Frame)

1 = NPLANES = number of scattering planes

0. 0. 180. 1 = phi, theta_min, theta_max (deg) for plane A

I want calculate nearfield of 2 shape , I see 2 different errors for each shape,one error when run ddpostprossess is " readnf sanity failure: inconsistent j1= 245786 and nat0= 279320"

and another error when run ddscat.par of another shape :"

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:

#0 0x7F354D819777

#1 0x7F354D819D7E

#2 0x7F354D16BD3F

#3 0x7F354D1B7E2C

#4 0x401DB9 in ddscat_

#5 0x40E2B5 in MAIN__ at DDSCAT_cpp.f90:? "

I dont know meaning of 2 errors?

Thanks advance. ]]>

DDA solution for polarization considering a gold nanorod shows an interesting pattern. The well-documented pattern (i.e. maximum @90°and minimum @180°) was obtained when the transverse wavelength was considered and beta, theta, and phi were set to zero. Using the same settings, the polarization patterns obtained for the longitudinal wavelength show patterns which deviate from their physical picture.

Please suggest the required modification that I need to make for obtaining the correct polarization pattern.

Thanks and regards,

Hirak ]]>

I want to calculate the polarization of two spheres.

One sphere has 1.33+0.01i refractive index and another sphere has 1.9+0.45i.

So I set ddscat.par such as :

2 = NCOMP = number of dielectric materials

'../diel/m1.33_0.01'

'../diel/m1.90_0.45'

Then, m1.33+0.01i is number 1 and m1.90++0.45i is nuber 2. Is it right?

And I set BAM file such as :

x y z a IC1 IC2 IC3 theta_DF phi_DF beta_DF

0.000000 0.000000 0.000000 0.500000 1 1 1 0.00000 0.00000 0.00000

0.000000 1.000000 0.000000 0.500000 2 2 2 0.00000 0.00000 0.00000

Because a sphere at (0,0,0) has m=1.33+0.01i which is number 1, so I set IC1=IC2=IC3=1.

And also at a sphere at (0,1,0) , I set IC1=IC2=IC3=2 because m=1.90++0.45i is nuber 2.

Is it right?

I can't sure that means of number of IC1, IC2, IC3.

I am a new user of ddscat.

I try to calculate scattering and absorption efficiencies of metal nanoparticles of arbitrary shapes and sizes.

I did a serial calculation with a sphere easily. but when I try a parallel calculation with MPI, I find very high values.

It is the same for all the algorithms

ZBCG2 IT= 1 f.err= NaN

…

cgcommon ckpt 20

iter= 8 frac.err= NaN

…

GPBICG IT= 10 f.err= 6.167E+00

…

…

sqrt(rnorm/bnorm)= 3 174106950333229.

sqrt(rnorm/bnorm)= 4 NaN

Other codes using MPI have been successfully implemented in our system, and the job submission procedures are correctly implemented.

The administrator followed all the instructions in the USer Guide. Did we miss an important information?

Regards

]]>I am using DDA to calculate the optical properties such as absorption, scattering and extinction for "CONELLIPS" shape (Two -layers). I have no idea about CONELLIPS shape, this type of target geometry is in-built or not. I have only changed the target geometry-(ELLIPSOID to CONELLIPS) and the composition-(40 40 40 60 60 60 = shape parameters 1 - 6) and run the code for two different materials. After that, i got the error as given below:

Error: FATAL ERROR IN PROCEDURE: TARCEL

AX < BX

EXECUTION ABORTED ]]>

I am working with ellipsoid Nanomatryushka particles having two or more layers. I need to simulate values for the Muller Matrices for the kind of particles. Can I do it with DDSCAT? Can I model Fano Resonance with it?

If I need to modify the CONELLIPSE section for my use, how can I do it?

Regards,

Hirak ]]>

Thank you

]]>I am work with ddscat7.2. Now I want plot polarization direction in each point.

but I cant compile wxxxryyykzzz.poln .Could you help me.

Thank you in advance.

I study scattering using DDSCAT7.3.

I have some questions about CYLNDRPBC.

I want to make regolith using CYLNDRPBC, so I wrote shape parameter such like ::60.0 1.0 1 1.0 1.0 .

Then, in the output file 'w000r000k000.sca', there are only two theta values(0, 180)

I want to (0~180)theta value.

How can I do?

I am research scholar in IIT Delhi, India. My research work is related to find the optical properties of the Nano-particles of different materials and different geometries. I found that the DDSCAT 7.3 is one of the most prominent code to study the characteristically properties of the different geometries. I am highly interested to find the optical properties for such geometries like ANI_ELL_2 ELLIPSO_2 and SPHROID_2. I have downloaded the user guide for DDSCAT 7.3 and its related examples from site of DDSCAT, But I did not found any example related to ANI_ELL_2, ELLIPSO_2 and SPHROID_2geometries.

Could you please provide the us these Examples (code) with their supporting files. The files will help me to study the optical properties of above geometries, which is very useful to enhance the efficiency of photovoltaics.

I will be highly obliged to your favor.

Thanking you

With Warm Regards

Shivani Bhardwaj

]]>Hi Dr. Draine,

We have decided to use the Fortran version of DDSCAT, rather than the C++

version; yours is much more up to date, reliable, and developed (probably

because DDSCAT seems to be your idea and creation in the first place). We

are using it on a high-performance computer because of the processing

requirements.

The DDSCAT program is incredible; the development of it over the years is

proving very useful for people like us using it in independent research.

We are currently trying to use the program to model simple reflection and

refraction, where we convert the incident light as a Gaussian beam into

Electric field components to simulate a plane wave, then convert the

output E-field back into a wave. We are trying to make our own code to generate

visualization graphics; and we believe that this method will allow us to

use DDSCAT for twisted light rather than regular plane waves.

I was hoping you could speak a little to the meaning of the outputs: I do

believe that the wxxxryyykzzz.En binary output is the one we want to use

for our calculations. Are you defining the near field as such because it is

the sum of the incident field and the scattered field? I am a little bit

confused on this; most things discussing near-field and far-field

radiation seem to indicate that there may be some other important difference between

the two fields.

So… I am hoping to clarify that E_sca is indeed the E field that we will

be able to process in order to create our scattered light waveforms. If you

can clarify this for me, that would be awesome. Otherwise, I'm sure with

the help of our professor my group will be able to figure out a solution.

Thank you very much for your time.

Best,

Josh Graber

We have the latest release of ddscat up and running on the high

performance computing center here; however we need the ASCII files as

ddpostprocess.out is said to contain.

The ddposprocess.out file doesn't show up though, and the ddscat.log

file says

"file = w000r000k000.E1

file is incompatible with present version of subroutine SUBREADNF"

We think that might be our problem. Could you possibly speak to that? I

don't know if it's something wrong with the way it was set up on our

system of if there is some new update or an error in the subroutine, but

anything you could give us would help a lot.

Thanks,

Josh Graber

FATAL ERROR IN PROCEDURE: ZBCG2WP

ITERN>ITERMX

EXECUTION ABORTED

How to solve this problem? Thanks a lot!

]]>»»> ITERN>ITERMX

»»> EXECUTION ABORTED

How to solve this problem?

]]>Hi Suman Dhayaj

We have Implemented FFT near-field. One version of this paper is available here:

ftp://ftp.astro.princeton.edu/draine/papers/pdf/OptEx_20_1247.pdf

But if you download DDSCAT code from

http://www.ddscat.com

you can also look at our implementation. It uses FFT but if do not have many dipoles you can calculate

near field witout FFT technique. We had a simple version of the near field calculation available in the

DDSCAT release before the 2012 (we can point to it if you need).

It is difficult for us to study your implementation because of time constraints on our part.

Piotr

On Fri, Nov 18, 2016 at 11:45 AM, Suman Dhayal <moc.liamg|layahdss#moc.liamg|layahdss> wrote:

Dear Professor Draine, Flatau,

This is Ms Suman Dhayal, an associate in research at Duke University. I need some help with the calculations using discrete-dipole approximation.

I have written the codes for calculations using DDA following the description in your JOSA, 11, 1994 paper. I have used it to do some Raman scattering calculations, and I am interested in doing some near field calculations now. I looked through your codes user's guide and some other papers but perhaps I am missing some information. If you could help me with it, I will be grateful to you.

So my query is over whether it will be correct to just take the unknown polarizations obtained by solving the simultaneous equations (7) from your paper and plug them in the general dipole field formula to compute the field in and around a sphere containing a cluster of spheres? I am attaching the small program I have written to do this if you would like to have a look at it.

It will be a big help if you could say whether I am doing it correctly. If not, some suggestion over where I am going wrong and how I may be able to correct it.

Thank you so much for your help,

Suman

]]>Yours truly,

DDSCAT user

Can we generate two infinite cylinders by using a periodic target?

]]>the following ways

- 7.3.2 fixes a bug that interfered with use of MPI for nearfield (NRFLD=1 or 2) calculations in 7.3.1
- 7.3.2 offers two new target options: regular octahedron, and spherical shell composed of uniaxial material (e.g. graphite)

The changes recommended by Dr. Ruzankin have now been implemented in a new release, DDSCAT 7.3.2, released today (2016 August 25) and available for download from ddscat.org — go to the "Downloads" tab. At this point in time we consider DDSCAT 7.3.2 to be fully compatible with MPI. If users encounter bugs with use under MPI, they should report them here.

]]>What is the largest applicable target size compared with wavelength? Any experience to calculate ~100um diameter target with 532nm wavelength?

]]>I have changed the scattering direction from TFRAME to LFRAME for one of example ddscat.par, CYLNDRPBC. Then, this error occurs;

FATAL ERROR IN PROCEDURE: REAPAR

CAN NOT USE LFRAME WHEN JPBC=1 OR 2

EXECUTION ABORTED

What is 'JPBC' ?

]]>(from DDPOSTPROCESS.f90)

! CXEINC(1-NXYZ,3) = complex incident macroscopic E field at all points

! CXESCA(1-NXYZ,3) = complex radiated macroscopic E field at all points

! CXPOL(1-NXYZ,3) = complex polarization/d^3 at all points

! CXADIA(1-NXYZ,3) = diagonal element of polarizability/d^3 at all pts

Can you please explain how each of these outputs are normalized? Specifically, can you please help me understand how to convert scattered electric field, incident electric field and polarization values extracted in DDSCAT to SI units?

]]>The best example I can give to help troubleshoot my issue is this ellipsoid (ddscat.par file copied at the bottom). I intended to create an ellipsoid with dimensions 7x7x11 nm and approximately 10,000 dipoles. I want the Qext values over a wavelength range of 200-1000 nm. I have tried this file for theta=0, theta=90, theta=0-90 (with 10 angles), as well as 0-90 for beta and theta, all while holding all the other angles constant at 0.. and every time I get the exact same Qext values. Shouldn't I get different extinction values when I am looking at the ellipsoid head on versus when it is rotated 90 degrees so I am looking at the long edge? Do you notice anything I am missing or doing wrong or do you have any suggestions of what I might try to change??

I've tried making this larger (70x70x110) and I've tried with as many as 100,000 dipoles as well, never with any success at recognizing the longer edge. I am using version 7.3.1, but not the most recent version of it.

Thank you!!

' ========== Parameter file for v7.3 ==================='

' Preliminaries '

'NOTORQ' = CMDTRQ*6 (DOTORQ, NOTORQ) — either do or skip torque calculations

'PBCGS2' = CMDSOL*6 (PBCGS2, PBCGST, GPBICG, QMRCCG, PETRKP) — CCG method

'GPFAFT' = CMETHD*6 (GPFAFT, FFTMKL) — FFT method

'GKDLDR' = CALPHA*6 (GKDLDR, LATTDR, FLTRCD) — DDA method

'NOTBIN' = CBINFLAG (NOTBIN, ORIBIN, ALLBIN) — binary output?

' Initial Memory Allocation '

100 100 100 = dimensioning allowance for target generation

' Target Geometry and Composition '

'ELLIPSOID' = CSHAPE*9 shape directive

25 25 39.286 = shape parameters 1 - 3

1 = NCOMP = number of dielectric materials

'../diel/polystyeq' = file with refractive index 1

' Additional Nearfield calculation? '

0 = NRFLD (=0 to skip nearfield calc., =1 to calculate nearfield E)

0.0 0.0 0.0 0.0 0.0 0.0 (fract. extens. of calc. vol. in -x,+x,-y,+y,-z,+z)

' Error Tolerance '

1.00e-5 = TOL = MAX ALLOWED (NORM OF |G>=AC|E>-ACA|X>)/(NORM OF AC|E>)

' Maximum number of iterations '

1000 = MXITER

' Integration limiter for PBC calculations '

1.00e-2 = GAMMA (1e-2 is normal, 3e-3 for greater accuracy)

' Angular resolution for calculation of <cos>, etc. '

0.5 = ETASCA (number of angles is proportional to [(3+x)/ETASCA]^2 )

' Wavelengths (micron) '

200 1000 801 'LIN' = wavelengths (1st,last,howmany,how=LIN,INV,LOG,TAB)

' Refractive index of ambient medium '

1.0000 = NAMBIENT

' Effective Radii (micron) '

4.0691 4.0691 1 'LIN' = eff. radii (1st,last,howmany,how=LIN,INV,LOG,TAB)

' Define Incident Polarizations '

(0,0) (1.,0.) (0.,0.) = Polarization state e01 (k along x axis)

2 = IORTH (=1 to do only pol. state e01; =2 to also do orth. pol. state)

' Specify which output files to write '

0 = IWRKSC (=0 to suppress, =1 to write ".sca" file for each target orient.

' Specify Target Rotations '

0. 0. 1 = BETAMI, BETAMX, NBETA (beta=rotation around a1)

0. 90. 10 = THETMI, THETMX, NTHETA (theta=angle between a1 and k)

0. 0. 1 = PHIMIN, PHIMAX, NPHI (phi=rotation angle of a1 around k)

' Specify first IWAV, IRAD, IORI (normally 0 0 0) '

0 0 0 = first IWAV, first IRAD, first IORI (0 0 0 to begin fresh)

' Select Elements of S_ij Matrix to Print '

9 = NSMELTS = number of elements of S_ij to print (not more than 9)

11 12 21 22 31 33 44 34 43 = indices ij of elements to print

' Specify Scattered Directions '

'LFRAME' = CMDFRM (LFRAME, TFRAME for Lab Frame or Target Frame)

1 = NPLANES = number of scattering planes

0. 0. 180. 1 = phi, theta_min, theta_max (deg) for plane A

In version 7.3.1's code (version 160601), in reapar.f90:

1470 ! check that user has not requested more than 1000 orientations and

1471 ! IWRKSC=1

1472

1473 IF(IWRKSC>0.AND.(NBETA*NTHETA*NPHI)>1000)THEN

1474 CALL ERRMSG('FATAL','REAPAR', &

1475 'error: if IWRKSC=1, NBETA*NTHETA*NPHI must be .le. 1000')

1476 ENDIF

Given the changes to the code in 7.3, this can be removed.

]]>In addition, a problem with parameter input for shape option BSLINPBC has been corrected. ]]>