I've had some trouble with using an 'edit-spec' with that READ command myself lately. An alternate approach for the first part is--

! DECLARE SERIES OF TYPE ZERO enter chg zero ! SETUP TO MATCH Z DATA; SKIP*DELTA SHOULD BE THE BIN WIDTH ! OFFSET IS THE Z COORD OF THE FIRST DATA POINT edit chg skip 1 delta 0.1 offset -36.0 ! OPEN AND READ CHARGE FILE open unit 1 read card name zchg.dat read chg unit 1 dumb colu 2

thank you very much. I obtain an reasonable graph when I did integrate from z to +z. However, the result seemed wrong if I integrate from -z to z. do you have any suggestion to modify the input or only thing i can do is reorganize my data?

The result depends on whether the integration starts from the middle of the bilayer or the middle of the water; the sign changes. The starting region for the integration should also be fairly flat, or else the integral will have an apparent slope.

Opps! I did a mistake, I wanted to say that I got reasonable graph when I integrate from 0 to +z, but not from -z to 0. I would expect a symmetric plot (from -z to 0 and from 0 to +z). And I also expect a fairly flat at the stating region before the slope appears, but i didnt get it (although the charge density show zero value at that region). Please find the enclosed picture. Any comment on that? thank you very much

For the slope problem, try shifting the starting point for the integration, perhaps by dropping a few initial points. I don't have much idea about the problem with the water. I've generally done the double integration using the -z to +z range.

Also, you need to average the charge density over many ns of data.

wrt to the script that we discuss, it seemed to me that I need to make an integration separately, from 0 to +z and from 0 to -z. if I did the double integration from -z to +z , I got a strength output as you can see from the attachment.

CHARMM uses a distinct system of units, the AKMA system. I.e. Angstroms, Kilocalories/Mole, Atomic mass units. All distances are measured in Angstroms, energies in kcal/mole, mass in atomic mass units, and charge is in units of electron charge.