[Pw_forum] interactive mm_dispersion routine
Roberto Pasianot
rpasianot at gmail.com
Thu Apr 7 19:23:29 CEST 2016
Ciao Aldo, this works for me
open(unit=4,file='/dev/stdin')
open(unit=3,file='/dev/stderr')
read(4,*)a
write(3,*)'This is a: ',a
end
Regards,
Roberto
On 4/7/16, Aldo Ugolotti <a.ugolotti at campus.unimib.it> wrote:
> Dear qe users,
> I'm trying to modify mm_dispersion file to have it asking interactively for
> some vdw coefficient AND radii. Hence I'm adding few lines to the file, in
> particular a write and a read statement. I get two problems:
> 1) writing to stdout the string gets taken from output file by redirection,
> but using stderr flow the compiler says that it's not defined;
> 2) I'm not able to correctly define an input device for reading the values:
> I've tried "100", "*" and "stdin". In this cases compiling is not a
> problem, but running the code gets always an error saying "unit -4
> unexpected end of file".
> How can I solve this?
>
> Thanks in advance,
>
> Aldo Ugolotti
> Master's thesist
> Università di Milano-Bicocca
>
More information about the users
mailing list