Skip to content

Add constraints for geometry optimization #2096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 40 commits into from
Jul 23, 2025

Conversation

ghutchis
Copy link
Member

Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

kantundpeterpan and others added 21 commits March 11, 2022 14:34
Signed-off-by: Heiner Atze <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: kantundpeterpan <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: kantundpeterpan <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: kantundpeterpan <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: kantundpeterpan <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: kantundpeterpan <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: kantundpeterpan <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: kantundpeterpan <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: kantundpeterpan <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: kantundpeterpan <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: kantundpeterpan <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: Heiner Atze <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: Heiner Atze <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: kantundpeterpan <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: kantundpeterpan <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: kantundpeterpan <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
@ghutchis ghutchis added the enhancement feature changes / API changes label Jul 12, 2025
@ghutchis ghutchis marked this pull request as draft July 12, 2025 02:18
ghutchis added 6 commits July 12, 2025 17:28
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
…gadrolibs into kantundpeterpan-constraints

Signed-off-by: Geoff Hutchison <[email protected]>
@ghutchis ghutchis marked this pull request as ready for review July 19, 2025 23:24
@ghutchis ghutchis linked an issue Jul 19, 2025 that may be closed by this pull request
4 tasks
ghutchis and others added 3 commits July 20, 2025 08:37
Co-authored-by: Eisuke Kawashima <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
return phi; // skip this torsion

Real sinPhi = sin(phi);
Real cosPhi = cos(phi);

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable cosPhi is not used.
Signed-off-by: Geoff Hutchison <[email protected]>
void ConstraintsExtension::openDialog()
{
if (m_dialog == nullptr) {
m_dialog = new ConstraintsDialog(qobject_cast<QWidget*>(parent()));

Check warning

Code scanning / CodeQL

Resource not released in destructor Warning

Resource m_dialog is acquired by class ConstraintsExtension but not released anywhere in this class.
Comment on lines +238 to +247
switch (action->data().toInt()) {
case freezeAction:
case unfreezeAction:
case fuseAction:
case unfuseAction:
action->setEnabled(!noSelection);
break;
default:
break;
}

Check warning

Code scanning / CodeQL

Use of integer where enum is preferred Warning

Enumeration types should be used instead of integers to select from a limited series of choices.
ghutchis added 3 commits July 23, 2025 11:13
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
Signed-off-by: Geoff Hutchison <[email protected]>
@ghutchis ghutchis merged commit 5a9ecc3 into OpenChemistry:master Jul 23, 2025
22 of 24 checks passed
@ghutchis ghutchis deleted the add-constraints branch July 23, 2025 21:11
@avo-bot
Copy link

avo-bot commented Jul 23, 2025

This pull request has been mentioned on Avogadro Discussion. There might be relevant details there:

https://discuss.avogadro.cc/t/july-2025-development-update/7032/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature changes / API changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Force field support for constraints
4 participants