TABLE OF CONTENTS


::pwtk::difden::segmentSpecialization

SYNOPSIS

proc ::pwtk::difden::segmentSpecialization {segmentIndex segmentSpec} {

PURPOSE

Set a special treatment of a specified segment for DIFDEN. For example, let us calculate the \Delta n(r) of CO molecule as \Delta n(r) = n(CO;r) - [n(C;r) + n(O;r)]. Both standalone atoms are spin-polarized and require corresponding specification in the input file. This is the purpose of this proc. The whole DIFDEN specification would look as follows:

      DIFDEN {
        name(1)    = "CO"
        segment(1) = "all"
        weight(1)  = 1.0

        name(2)    = "C"
        segment(2) = 1
        weight(2)  = -1.0

        name(3)    = "O"
        segment(3) = 2
        weight(3)  = -1.0
     }

     # both C and O have a total magnetization of 2
     set spinSpecs {
         SYSTEM {
            nspin = 2
            tot_magnetization = 2
         }    
     }
     ::pwtk::difden::segmentSpecialization 2 $spinSpecs
     ::pwtk::difden::segmentSpecialization 3 $spinSpecs
      
     ::pwtk::difden::run CO.difden   

ARGUMENTS

SOURCE

    variable difden
    return [::pwtk::input::script DIFDEN.segmentSpec,$segmentIndex $segmentSpec]
}