Constraints dialog

It’s getting there…

Any interface suggestions? I’m inclined to add these:

  • control-click in the regular bond, angle, or torsion tables to add a constraint / lock that item (with a lock icon)
  • same thing in the atom x, y, z properties (freeze atom, x, y, or z coordinate)
  • new menu command to “Add Selected Constraint…” that guesses based on selecting two, three, or four atoms what you want to constrain
    • if you select 4 atoms, if there’s a central bond it guesses torsion or out-of-plane constraint if there’s 3 atoms around a central atom

Also at the moment, the dialog only shows bond, angle, torsion constraints, but not frozen coordinates. It’s much easier technically if that’s a separate window (e.g., in the atom properties).

There’s also a bunch of general interface polish needed, but it should be ready for broader testing soon.

3 Likes

Looks and sounds great!

I can’t quite tell – is the table in the dialog a list of existing constraints or all possible constraints? The former would make much more sense to me.

It’s the list of existing constraints as an example. (I added a “Fuse Selected” command that constraints all atomic distances if you want to do a rigid-body optimization.)

1 Like

I’ll mention that this pull request is already getting pretty long. I’m going to add one more piece to read/write the constraints and frozen coordinates in CJSON and then merge for testing.