input_description -distribution {Quantum ESPRESSO} -package PWscf -program pwcond.x {  

    toc {}

    intro {
	This program computes the transmittance of a system and/or its
	complex band structure. 
	It is controlled through the following variables 
	in the namelist inputcond.

	Structure of the input data:
	============================

	   &INPUTCOND
	     ...
	   /
    }

    namelist INPUTCOND {

	var outdir  -type CHARACTER {
	    info {
		temporary directory (as in PWscf)
	    }
	}

	var prefixt  -type CHARACTER {
	    info {
		prefix for the file (as in PWscf) containing all the
		regions (left lead + scatt. reg. + right lead)
	    }
	}

	var prefixl  -type CHARACTER {
	    info {
		prefix for the file containing only the	left lead
	    }
	}

	var prefixs  -type CHARACTER {
	    info {
		prefix for the file containing the scattering region
	    }
	}

	var prefixr  -type CHARACTER {
	    info {
		prefix for the file containing only the right lead
	    }
	}

	var tran_prefix  -type CHARACTER {
	    default { none }
            see { recover }
	    info {
		if tran_prefix is specified the program will save partial results
		of a transmission calculation (ikind .GE. 1) in a specific 
		directory (outdir/tran_prefix.cond_save)
	    }
	}

	var max_seconds -type REAL { 
	    default { 1.D+7, or 150 days, i.e. no time limit }
            see { tran_prefix }
	    info {
		jobs stops after max_seconds elapsed time (wallclock time). 
		It can be enabled only if tran_prefix is specified.
	    }	    
	}

	var recover   -type LOGICAL {
	    default { .FALSE. }
	    see { tran_prefix }
	    info {
		restarts a previously interrupted transmission calculation (only if 
		tran_prefix was specified). It can also be used to gather partial 
		results from a calculation that was split by using start_e,last_e 
		and/or start_k,last_k (see corresponding keywords).
	    }
	}

	var band_file  -type CHARACTER  {
	    info {
		file on which the complex bands are saved
	    }
	}

	var tran_file  -type CHARACTER  {
	    info {
		file where the transmission is written
	    }
	}

	var save_file  -type CHARACTER  {
	    info {
		file where the data necessary for PWCOND are written
		so that no prefix files of PW are longer needed
	    }
	}
	var fil_loc  -type  CHARACTER {
	    info {
		file on/from which the 2D eigenvalue problem data are
		saved/read
	    }
	}

	var lwrite_cond  -type LOGICAL {
	    info {
		if .t. save the data necessary for PWCOND in save_file
	    }
	}

        var loop_ek  -type LOGICAL {
            info {
                if .t. the energy loop is outside the k-point loop 
            }
        }

	var lread_cond  -type LOGICAL {
	    info {
		if .t. read the data necessary for PWCOND from save_file
	    }
	}

	var lwrite_loc  -type LOGICAL {
	    info {
		if .t. save 2D eigenvalue problem result in fil_loc
	    }
	}

	var lread_loc  -type LOGICAL {
	    info {
		if .t. read 2D eigenvalue problem result from fil_loc
	    }
	}

	var ikind  -type INTEGER {
	    info {
   	       The kind of conductance calculation:
   
                  ikind=0  - just complex band structure (CBS) calculation
   
                  ikind=1  - conductance calculation with identical 
                             left and right leads
   
                  ikind=2  - conductance calculation with different
		             left and right leads       
	    }
	}

	var iofspin  -type INTEGER {
	    info {
		spin index for which the calculations are performed
	    }
	}

        var tk_plot  -type INTEGER {
            info {
               if > 0, plot T(kx,ky) at each energy in the region [tk_plot x full BZ] 
            }
        }

	var llocal  -type  LOGICAL {
	    info {
		if .t. calculations are done with only local part of PP 
	    }
	}

	var bdl  -type REAL {
	    info {
		right boundary of the left lead (left one is supposed to be at 0) 
                (in units of lattice parameter "alat" defined in the scf run)
	    }
	}

	var bds  -type REAL {
	    info {
		right boundary of the scatt. reg. (left one is at 0 if prefixs
                is used and = bdl if prefixt is used) 
                (in units of lattice parameter "alat" defined in the scf run)
	    }
	}

	var bdr  -type REAL {
	    info {
		right boundary of the right lead (left one is at 0 if prefixr
		is used and = bds if prefixt is used) 
                (in units of lattice parameter "alat" defined in the scf run)
	    }
	}

	var nz1  -type INTEGER {
	    info {
		the number of subslabs in the slab (to calculate integrals)
	    }
	}

	var energy0  -type REAL {
	    info {
		initial energy 
	    }
	}

	var denergy  -type REAL {
	    info {
		energy step (if denergy=0.0 the energy is read from the list)
	    }
	}

	var nenergy  -type INTEGER {
	    info {
		number of energies 

		WARNING: the energy in input file is given in eV taken from Ef,
		         and denergy should be negative
	    }
	}

	var start_e  -type INTEGER {
	    default { 1 }            
	    see { last_e }            
	    info {
		if start_e > 1, the scattering problem is solved only for those 
                energies with index between start_e and last_e in the energy list.

		NOTE: start_e <= last_e and start_e <= nenergy must be satisfied
	    }
	}

	var last_e  -type INTEGER {
	    default { nenergy }            
	    see { start_e }            
	    info {
		index of the last energy to be computed. If last_e > nenergy, 
		then last_e will be automatically set to nenergy.
	    }
	}

	var start_k  -type INTEGER {
	    default { 1 }            
	    see { last_k }            
	    info {
		if start_k > 1, the scattering problem is solved only for those 
                k-points with index between start_k and last_k in the k-point list.
		In order to recover the full transmission (i.e. integrated over the 
		full Brillouin Zone) at the end, perform the partial runs specifying
		a value for tran_prefix (the restart directory), then put all the 
		partial transmission files 'transmission_k#_e#' inside a unique 
		restart directory and run pwcond.x with recover=.TRUE. (without 
		specifying any value for start_k and last_k).

		NOTE: start_k <= last_k must be satisfied and start_k must also
		   not be greater than the actual number of k-point in the list
		   (if you compute the grid automatically by specifying the grid 
		   size and shifts, you can use kpoints.x to check that number).
	    }
	}

	var last_k  -type INTEGER {
	    default { nenergy } 
	    see { start_k }            
	    info {
		index of the last k-point to be computed. If last_k is bigger than the
		actual number of points in the list, then it will be set to that number. 
	    }
	}

	var ecut2d -type  REAL {
	    info {
		2-D cutoff
	    }
	}
	var ewind  -type REAL { 
	    info {      
		the energy window for reduction of 2D plane wave basis set (in XY)
	    }
	}

	var epsproj  -type REAL {
	    info {
		accuracy of 2D basis set reduction
	    }
	}

	var orbj_in  -type REAL {
	    info {
		the initial orbital for projecting the transmission 
	    }
	}

	var orbj_fin  -type REAL {
	    info {
		the final orbital for projecting the transmission 
	    }
	}
    }

    card K_and_Energy_Points -nameless 1 {
	syntax {
	    line {
		var nkpts -type INTEGER {
		    info {
			Number of k_\perp points
		    }
		}
	    }
	    table k_points {
		rows -start 1 -end nkpts {
		    colgroup -type REAL {
			col kx
			col ky
			col weight
			info {
			    k-point coordinates and weights
			}
		    }
		}
	    }
	    line {
		var nenergy -type INTEGER {
		    info {
			number of energy points
		    }
		}
	    }
	}
    }
}




