Skip to content

Fixing conj keyword for GULP (#211)#212

Merged
andrewtarzia merged 1 commit into
JelfsMaterialsGroup:masterfrom
DBodesheim:fix-GULP-Conj-Keyword
May 18, 2026
Merged

Fixing conj keyword for GULP (#211)#212
andrewtarzia merged 1 commit into
JelfsMaterialsGroup:masterfrom
DBodesheim:fix-GULP-Conj-Keyword

Conversation

@DBodesheim

Copy link
Copy Markdown
Contributor

See #211

@DBodesheim

Copy link
Copy Markdown
Contributor Author

Consider the following example script:

import stko
import stk
from pathlib import Path

gulp_path = Path('/path/to/gulp')

gulp_opt = stko.GulpUFFOptimizer(
    gulp_path=gulp_path,
    output_dir="test",
    conjugate_gradient=True,
)

mol = stk.BuildingBlock(smiles='Cc1ccccc1')
gulp_opt.assign_FF(mol=mol)
gulp_cage = gulp_opt.optimize(mol=mol)

With the old implementation we get the following error:
image

With the new one, the unit keyword is not present anymore and the optimization runs through (see attached files).

min_example_gulpchange.zip

@andrewtarzia andrewtarzia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For backwards compatability, is it possible to "easily" determine the gulp version and then use conj unit for <6.4 and conj for >=6.4?

Even if it is "wrong", which I am unsure if it is based on the output files I have found and I have not analyses it closely enough, this solution means that the wrong solution from before is not broken in this version. What do you think?

@andrewtarzia andrewtarzia merged commit 226719a into JelfsMaterialsGroup:master May 18, 2026
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants