On Apr 25, 2008, at 7:20 AM, Amnon Willinger wrote:
>
> I would like to know if it is possible to write a ctl script that  
> will calculate and output the field distribution (let say Hz,Ex,Ey)  
> of a given k-point for which a single appropriate band number (out  
> of the 12, for example) is wanted.
>

Absolutely.  To output all the bands at a particular k-point, you  
would use the built-in output-at-kpoint function, for example:

(run-tm (output-at-kpoint (vector3 ....whatever....) output-hfield-z  
output-efield-x output-efield-y))

To output only a particular band, you have to write your own band  
function, but it's pretty easy to write something similar to output-at- 
kpoint:

(define (output-only-band the-band . band-funcs)
   (let ((band-func (apply combine-band-functions band-funcs)))
     (lambda (which-band)
       (if (= the-band which-band)
           (band-func which-band)))))

Then just do

(run-tm (output-at-band 5 (output-at-kpoint (vector3 ...)  output- 
hfield-z ....etc....)))

to output (e.g.) only fields for band 5 at the particular k-point.

Regards,
Steven G. Johnson


_______________________________________________
mpb-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss

Reply via email to