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

Structure Files Use Tab Separators on Columns #272

Closed
r-e-g-ular opened this issue Oct 15, 2024 · 3 comments
Closed

Structure Files Use Tab Separators on Columns #272

r-e-g-ular opened this issue Oct 15, 2024 · 3 comments

Comments

@r-e-g-ular
Copy link

r-e-g-ular commented Oct 15, 2024

Structure files generated using molSimplify (mol3D.py?) separate coordinate columns with tabs rather than spaces. See: "writexyz" and "coord_string" functions with commands like ss += "%s \t%f\t%f\t%f\n" % (atom.sym, xyz[0], xyz[1], xyz[2])", among others.

This behaviour is undesirable as:

  1. It is inconsistent with other programs which generate structures (Avogadro, ASE).
  2. It requires tab-space replacement before structure files can be used as input for certain calculators
    (Orca requires coordinate columns to be space separated: https://orcaforum.kofo.mpg.de/viewtopic.php?f=11&t=11726&p=47766&hilit=xyz+syntax#p47766).

Suggested fix:
If possible, i.e. if structure files will still work with your calculator of choice (TeraChem?), replace tab insertion with insertion of 8 spaces.

@gianmarco-terrones
Copy link
Contributor

Hi @r-e-g-ular, we just pushed a change that hopefully addresses your issue. Let us know how it works!

@gianmarco-terrones
Copy link
Contributor

To use the flag with the startgen_pythonic geometry construction function, use code like the following:

from molSimplify.Scripts.generator import startgen_pythonic
input_dict = {'-core': 'ir', '-lig': 'h2o', '-ligocc': '6', '-oxstate': '3', '-geometry': 'oct', '-coord': '6', '-spin': '1', '-no_tabs': '0'}
# Value of the -no_tabs key does not matter
startgen_pythonic(input_dict=input_dict, write=True)

@r-e-g-ular
Copy link
Author

@gianmarco-terrones This fix works beautifully. Thank you very much.

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

No branches or pull requests

2 participants