Open ajjackson opened 4 days ago
I wonder if it will be better to have separate arguments selecting the optimising filter and selecting other constraint(s) as these are really independent choices.
I think the docstring is wrong, sorry.
Through the Python interface you could pass the actual constraint function, or (untested) the Atoms already constrained.
This is somewhat of a remnant of moving from ASE 3.22.1, where everything was contained within the constraints
module, but yes now that they're separate modules, individual arguments sounds like a reasonable addition.
Constraints and Filters don't really work the same way, though. I don't see how e.g. unit-cell optimisation with a FixedAtoms constraint could be set up correctly through the current Python API. In #313 you can see how the constraint should be attached.
Ok yes, sorry I didn't think through passing the function through carefully enough, I agree that shouldn't work.
Would you not expect the latter suggestion
struct.set_constraint(constraint)
GeomOpt(struct)
to work though?
I'm probably missing something, but I don't see why it should need to be constrained within the optimiser class?
Yeah that should work, and would simplify implementation a bit more! Would it have implications for logging etc.?
The docstring for
janus geomopt
includesbut the code does not actually seem to look for functions in ase.constraints. I would like to use the FixSymmetry constraint with a full geometry optimisation. Is there a way to make that work?