[Pw_forum] Fwd: xsf to pwscf input
Tone Kokalj
tone.kokalj at ijs.si
Fri Jan 27 12:17:45 CET 2012
On Thu, 2012-01-26 at 10:51 +0100, Gabriele Sclauzero wrote:
> > Hello Payam,
> >
> >
> > there is something doing that in the PWTK program by Tone
> > Kokalj, see http://pwtk.qe-forge.org/ and search for XSF in the
> > webpage.
> > You could search the corresponding code in the script files (should
> > be under pwtk/src/pwi.tcl, see
> > http://qe-forge.org/scm/browser.php?group_id=29)
> > and adapt it to your needs.
Indeed the pwtk can do it. How, see the attached pwtk's script;
note that it requires pwtk,
http://qe-forge.org/frs/download.php/64/pwtk-0.99.1.tar.gz
Regards,
--
Anton Kokalj
J. Stefan Institute, Jamova 39, 1000 Ljubljana, Slovenia
(tel: +386-1-477-3523 // fax:+386-1-477-3822)
Please, if possible, avoid sending me Word or PowerPoint attachments.
See: http://www.gnu.org/philosophy/no-word-attachments.html
-------------- next part --------------
#
# Usage: pwtk xsf2pwi.pwtk xsfFile [celldm(1)]
#
# Purpose: converts XSF file into pw.x syntax
#
# celldm(1) parameter is optional, if not given, will be set to 1.0
#
if { [llength $argv] < 2 } {
puts stderr "Usage: pwtk [lindex $argv 0] xsfFile \[celldm(1)\]"
exit 1
}
if { [llength $argv] == 3 } {
set celldm1 [lindex $argv 2]
if { ! [string is double $celldm1] } {
puts stderr "*** user error: specified celldm(1) is not a number ***"
exit 1
}
} else {
set celldm1 1.0
}
set xsfFile [lindex $argv 1]
#
# do the job
#
SYSTEM " celldm(1) = $celldm1 "
::pwtk::pwi::CELL_PARAMETERS_and_ATOMIC_POSITIONS_fromXSF $xsfFile
puts ""
puts [::pwtk::input::namelistGet SYSTEM]
puts [::pwtk::input::cardGet CELL_PARAMETERS]
puts [::pwtk::input::cardGet ATOMIC_POSITIONS]
More information about the Pw_forum
mailing list