[Pw_forum] little suggestion
Paolo Giannozzi
giannozz at nest.sns.it
Fri May 5 18:31:03 CEST 2006
On Thursday 04 May 2006 15:47, Xunlei Ding wrote:
> In the output file of pwscf of a scf calculation, only the last "total
> energy" has a '!' before it, as
> "! total energy", so we can use grep "! total energy" to fine it
> easily.
> I think it is also convenient to add a "!" also before the last "total
> magnetization" of a scf calculation, isn't it?
it could be easily done, but it could also break scripts that
use grep to find the total energy. Maybe it is time to think
a little bit on how to write a better-organized output that is
both human-readable and easy to parse.
Anyway, if you like it, you just have to replace in
PW/electrons.f90 the line
IF ( lsda ) WRITE( stdout, 9017 ) magtot, absmag
with (for instance)
IF ( lsda ) THEN
IF ( conv_elec ) THEN
WRITE( stdout, 9017 ) magtot, absmag
ELSE
WRITE( stdout, 9019 ) magtot, absmag
END IF
END IF
9019 FORMAT(/'! total magnetization =', F9.2,' Bohr mag/cell', &
/'! absolute magnetization =', F9.2,' Bohr mag/cell' )
Paolo
--
Paolo Giannozzi e-mail: giannozz at nest.sns.it
Scuola Normale Superiore Phone: +39/050-509876, Fax:-563513
Piazza dei Cavalieri 7 I-56126 Pisa, Italy
More information about the users
mailing list