Open CedricTravelletti opened 10 months ago
there is a question whether this should be part of Geometry optimization or part of AtomsBase. Is the constraint part of the system or part of the simulation? E.g. I can see that one might want to do other kinds of simulation tasks with the same constraints....
I vaguely recall a conversation to this effect on one of the Zoom calls (or maybe it was at JuliaCon hackathon last summer?). If I had to pick one, I think I'd say it's part of the simulation, but it's probably really a separate thing and if we could make it "portable" in the sense you describe, that would be ideal.
Maybe the AtomsBase interface should be extended for managing constraints but not necessarily provide implementations of constraints or just very simple examples.
I am also very unsure about this tbh.
Often when people setup structures they provide "additional atoms" not because they care about them, but only because that is needed for the modelling. From the philosophical point of view it's thus a numerical trick, but from the practitioner point of view I think it will be very confusing to have this separated from the structure. I think the practical expectation is more that you set up your system (including the constraints) and then just apply certain computational methods to it, that all do their best to respect the constraints.
But I agree with the general uncertainty how to handle this.
As described in https://github.com/JuliaMolSim/GeometryOptimization.jl/pull/1#discussion_r1431722115 , one should be able to restrict atoms movement along a submanifold, e.g. certain atoms are allowed to slide on a surface. Currently atoms are either completely clamped or not.
Possible implementation directions include:
OptimizationFunction
(see docs).