TABLE OF CONTENTS


::pwtk::pwi::replaceCoor

SYNOPSIS

proc ::pwtk::pwi::replaceCoor {coorLines {lengthUnit ""}} {

PURPOSE

Overwrite the ATOMIC_POSITIONS card with the new atomic coordinates as specified by coorLines in such a way that the old if_pos(:) records are maintained (the fixed components will remain fixed even if $coorLines does not have the if_pos(:) fields. This requires that $coorLines contain the same number of atoms as the current (old) ATOMIC_POSITIONS card.

BEWARE: works for non-path calculations !!!

ARGUMENTS

SOURCE

    set atmPos [::pwtk::pwi::coorToAtmPos $coorLines]
    if { $lengthUnit == "" } {
        set lengthUnit [::pwtk::input::cardGetFlags ATOMIC_POSITIONS]
    }
    ATOMIC_POSITIONS $lengthUnit $atmPos
    ::pwtk::pwi::setNAtoms
}