Skip to content

Sym=0 fix#206

Open
mducle wants to merge 1 commit into
masterfrom
sym0_fix
Open

Sym=0 fix#206
mducle wants to merge 1 commit into
masterfrom
sym0_fix

Conversation

@mducle

@mducle mducle commented Oct 22, 2024

Copy link
Copy Markdown
Member

For some reason specifying 'sym', 0 does not turn off symmetry but instead uses 'P 1' which means that rather than making every bond with the same distance equivalent it makes each bond inequivalent. This causes an error in tutorial 4 as noted by a user in #205. Instead an empty 'sym', [] means no symmetry and to use the bond lengths.

This PR adds a check which reverts the 'sym', 0 behaviour of the tutorial, but also changes the tutorial to remove any specification of symmetry (the 'sym' parameter is empty by default).

@codecov-commenter

codecov-commenter commented Oct 22, 2024

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.58%. Comparing base (d859b68) to head (b00f26a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #206      +/-   ##
==========================================
- Coverage   42.65%   42.58%   -0.07%     
==========================================
  Files         241      241              
  Lines       16253    16255       +2     
==========================================
- Hits         6933     6923      -10     
- Misses       9320     9332      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions

github-actions Bot commented Oct 22, 2024

Copy link
Copy Markdown

Test Results

    4 files    116 suites   5m 38s ⏱️
  733 tests   705 ✅ 18 💤 3 ❌  7 🔥
2 104 runs  2 040 ✅ 36 💤 8 ❌ 20 🔥

For more details on these failures and errors, see this check.

Results for commit b00f26a.

♻️ This comment has been updated with latest results.

param.sym = param.spgr;
end
end
if ~isempty(param.sym) && isnumeric(param.sym) && param.sym == 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This fails when symmetry is given as a matrix
`spgr_type=[ 1 0 0 0
0 1 0 0
0 0 1 0]';

Can add && isscalar(param.sym) to the check:
if ~isempty(param.sym) && isnumeric(param.sym)&& isscalar(param.sym) && param.sym == 0,

but it seems like there's also an issue with the label it makes, and I didn't manage to figure out what's supposed to happen there...

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.

3 participants