ulissigroup / vasp-interactive

GNU Lesser General Public License v2.1
53 stars 11 forks source link

New stdout / stdin processing for VASP 6.4.1+ #48

Open alchem0x2A opened 1 year ago

alchem0x2A commented 1 year ago

Starting VASP 6.4.1 there are huge changes to the INPOS subroutine which basically breaks the current vasp-interactive workflow. #47

There are quite a few TODOs though

Alexyjones commented 1 year ago

Just played again with this problem. I couldn't find a way to make the supply of lattice and positions work in one shot. So I removed the isif = 3 condition. Turned out, that even then it was broken. It seems the number of lines needed for stdin has changed. I could get it to work again by removing the lines to write New scaled positions and Old scaled position. I added to read one line, where VASP gives the amount of atoms and coordinates.

Starting from line 464 my vasp.interactive looks like this now (sorry, very messy):

        #self._stdout("New scaled positions\n", out=out)
        #for i in range(len(atoms)):
        #    self._stdout(self.process.stdout.readline(), out=out)
        #self._stdout("Old scaled positions\n", out=out)
        #for i in range(len(atoms)):
        #    self._stdout(self.process.stdout.readline(), out=out)
        text = self.process.stdout.readline()      # Added by AG
        self._stdout(text, out=out)                      # Added by AG

I think this would likely break things for other VASP versions. Maybe one could use the POSITIONS AND LATTICE line to distinguish on how to read and write to the respective vasp version. Hope to be able to try that soon.

The vasp.out looks like this now:

`POSITIONS: reading from stdin Inputting positions... 5 15 POSITIONS: read from stdin LATTICE: reading from stdin New direct lattice vectors reciprocal lattice vectors 11.2582360 0.0000000 0.0000000 0.0888239 0.0000000 0.0000000 0.0000000 11.2582360 0.0000000 0.0000000 0.0888239 0.0000000 0.0000000 0.0000000 11.2582360 0.0000000 0.0000000 0.0888239

Old direct lattice vectors reciprocal lattice vectors 11.2582360 0.0000000 0.0000000 0.0888239 0.0000000 0.0000000 0.0000000 11.2582360 0.0000000 0.0000000 0.0888239 0.0000000 0.0000000 0.0000000 11.2582360 0.0000000 0.0000000 0.0888239

LATTICE: read from stdin`