Skip to content

Conversation

@GiulioIlBen
Copy link
Contributor

The plams interface instead of living in scm.conformers has moved to scm.plams. This is in accordance with what @mhellstr and I discussed, we think is a cleaner approach and more inline with plams design.

Added method plot_conformers to ConformersResults .

Updated the notebooks examples but not the .py files yet.

Let me know what do you think.

Giulio Benedini added 4 commits September 15, 2025 20:24
switched to uv some commands such that you do not need to pollute the amspython with tools like black and nbconvert
@@ -1,55 +0,0 @@
#!/usr/bin/env amspython
from scm.plams import *
from scm.conformers import ConformersJob, ConformersResults
Copy link
Contributor

Choose a reason for hiding this comment

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

This is used as an example in the nightly tests - so either that needs to be updated or this can be added back in

return el

@requires_optional_package("matplotlib")
def plot_conformers(
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be here or in tools/plot for consistency?

* Make commits of logical units
* Make sure your commit messages are informative
* Make sure you have added the necessary tests for your changes
* Add examples: take a look at the corresponding [README.md](./examples/README.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

Also update CHANGELOG (here and for your change!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should I mention that I changed the CONTRIBUTING.md file in the CHANGELOG?

@dormrod dormrod force-pushed the GiulioBenedini/Conformers branch 3 times, most recently from cf29976 to d572a57 Compare September 16, 2025 10:29
forcefield_params_from_kf,
)
from scm.plams.interfaces.adfsuite.inputparser import get_system_blocks_as_molecules_from_input, input_to_settings
from scm.plams.interfaces.adfsuite.inputparser import (
Copy link
Contributor

Choose a reason for hiding this comment

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

For future PRs, please can you turn off the auto-reordering of imports? It bloats the diff and makes it a bit harder to review

__all__ = ["ConformersJob", "ConformersResults"]


class ConformersCollection:
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that this is actually not just a straight "lift and shift".

You have replaced the old Conformers usage to remove the dependency on scm.conformers with this class. This seems like it might have consequences - will some functionality be lost? The plan is I assume to remove the old implementation in scm.conformers?

Might be worth asking @rebadam if you have not already discussed with her.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am quite ok with the PLAMS wrapper around the conformers tool being very basic. Though I would prefer if we could point the user to the conformers library we already have if they want more functionality. But I don't like so much that you wrote a whole new Conformers class. It is very basic, which is good, but I am afraid people will start adding to it, which will result in a lot of double coding. I would prefer if the functionality of the ConformersContainer class would just be folded into the Results class directly. The conformers property of the results class could just be deprecated.

if not path.name.endswith("conformers.xyz"):
raise ValueError(f"{path=} not valid")

assert path.exists()
Copy link
Contributor

Choose a reason for hiding this comment

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

(don't use assert in production code)

raise ValueError(f"{path=} not valid")

assert path.exists()
molecules = read_all_molecules_in_xyz_file(str(path))
Copy link
Contributor

Choose a reason for hiding this comment

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

Using the xyz files for example loses any bonding information?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I agree here. It would be super simple to just read from the conformers.rkf file, which also has higher precision for the coordinates. The RKF file just has the geometries and energies in the History section.

@GiulioIlBen
Copy link
Contributor Author

If I run ConformersJob from a different Python environment, which Python environment does the workflow use—the default amspython or the one I launched it from?

@dormrod
Copy link
Contributor

dormrod commented Sep 18, 2025

If I run ConformersJob from a different Python environment, which Python environment does the workflow use—the default amspython or the one I launched it from?

It will be called with:

"$AMSBIN"/amspython -c "from scm.utils.workflows import run_workflow; from scm.conformers import AMSConformers; run_workflow(AMSConformers)" $@

so amspython

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.

5 participants