Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VASP handler needed for ERROR: there must be 1 or 3 items on line 2 of POSCAR #291

Open
2 of 4 tasks
Andrew-S-Rosen opened this issue Sep 14, 2023 · 2 comments
Open
2 of 4 tasks
Labels

Comments

@Andrew-S-Rosen
Copy link
Member

Andrew-S-Rosen commented Sep 14, 2023

Email (Optional)

No response

Version

2023.7.22

Which OS(es) are you using?

  • MacOS
  • Windows
  • Linux

What happened?

There is a (new?) VASP error shown below. It occurs when you make a POSCAR file with Windows line-endings. Changing the encoding fixes the POSCAR every time. This isn't really a high-priority thing since it will only ever happen if the user is making input files manually, in which case they probably aren't using Custodian.

 -----------------------------------------------------------------------------
|                                                                             |
|     EEEEEEE  RRRRRR   RRRRRR   OOOOOOO  RRRRRR      ###     ###     ###     |
|     E        R     R  R     R  O     O  R     R     ###     ###     ###     |
|     E        R     R  R     R  O     O  R     R     ###     ###     ###     |
|     EEEEE    RRRRRR   RRRRRR   O     O  RRRRRR       #       #       #      |
|     E        R   R    R   R    O     O  R   R                               |
|     E        R    R   R    R   O     O  R    R      ###     ###     ###     |
|     EEEEEEE  R     R  R     R  OOOOOOO  R     R     ###     ###     ###     |
|                                                                             |
|     ERROR: there must be 1 or 3 items on line 2 of POSCAR                   |
|                                                                             |
|       ---->  I REFUSE TO CONTINUE WITH THIS SICK JOB ... BYE!!! <----       |
|                                                                             |
 -----------------------------------------------------------------------------

Code snippet

No response

Log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Andrew-S-Rosen Andrew-S-Rosen changed the title [Bug]: VASP handler needed for ERROR: there must be 1 or 3 items on line 2 of POSCAR VASP handler needed for ERROR: there must be 1 or 3 items on line 2 of POSCAR Oct 7, 2023
@shyuep
Copy link
Member

shyuep commented Jun 25, 2024

One way to sort this out easily is to convert all input files to Unix line endings before the start of a job. It is just a call to dos2unix * before the start of a run? E.g.,

if os.name == "posix":
    os.system("dos2unix *")

I would imagine this has negligible CPU cost.

@Andrew-S-Rosen
Copy link
Member Author

Andrew-S-Rosen commented Jun 25, 2024

Good suggestion. My only concern with this is that not all machines may have this utility (Wikipedia says it's not part of the Unix standard, although I imagine most machines do have it.

Of course, this is easy to get around: simply catch an exception and move on.

Edit: And it should not be * because Custodian can now be run on directories other than the pwd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants