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

Gromacs topology parser #401

Open
subhamoymahajan opened this issue Oct 8, 2024 · 0 comments
Open

Gromacs topology parser #401

subhamoymahajan opened this issue Oct 8, 2024 · 0 comments

Comments

@subhamoymahajan
Copy link

If bond types are not specified under "[ bondtypes ]", and mentioned under molecule definitions in .top file, atom types (e.g., "cd") are not converted to integers leading to error in "gromacs/gromacs_parser.py line 805".

 File "convert.py", line 811, in <module>
    main()
  File "convert.py", line 223, in main
    system, prefix, gro_in, top_in = _load_gromacs(gromacs_files=args['gro_in'])
  File "convert.py", line 573, in _load_gromacs
    system = gmx.load(top_in, gro_in)
  File "/srv/home/smahajan29/softwares/InterMol/intermol/gromacs/gromacs_parser.py", line 38, in load
    return parser.read()
  File "/srv/home/smahajan29/softwares/InterMol/intermol/gromacs/gromacs_parser.py", line 419, in read
    self.create_moleculetype(top_moltype, mol_name, mol_count)
  File "/srv/home/smahajan29/softwares/InterMol/intermol/gromacs/gromacs_parser.py", line 727, in create_moleculetype
    self.create_bond(bond)
  File "/srv/home/smahajan29/softwares/InterMol/intermol/gromacs/gromacs_parser.py", line 805, in create_bond
    atoms = [int(n) for n in bond[:n_atoms]]
  File "/srv/home/smahajan29/softwares/InterMol/intermol/gromacs/gromacs_parser.py", line 805, in <listcomp>
    atoms = [int(n) for n in bond[:n_atoms]]
ValueError: invalid literal for int() with base 10: 'cd'

Currently modifying the topology file to defined bondtypes resolves the issue.

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

1 participant