Skip to content

Cent - #47

Merged
jkclegg merged 18 commits into
devfrom
cent
Jun 23, 2026
Merged

Cent#47
jkclegg merged 18 commits into
devfrom
cent

Conversation

@jkclegg

@jkclegg jkclegg commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Here is the more substantial update and it seems to work... we will continue to test but all seems ok.

Basically I have pulled out the maths out of a few things to make a new crystal_maths utility and then I have used that to make analysis of multiple planes possible.

Then I've introduced centroid-centroid measurements - even taking symmetry codes. There is a module and pipeline. I am pulling the coordinates out of the .lst files so there is now a .lst parser. Thanks to Claude for writing that!

I've also fixed some of the graphing for hbonds.

Things to think about in the future.... should we do a centroid/rotation calc from cif? any other analysis we need :)

@jkclegg
jkclegg requested a review from amyjaynethompson June 11, 2026 03:17

@amyjaynethompson amyjaynethompson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for making these changes - there's some really useful looking stuff here :)

Have left a few comments mostly for general code structure stuff - you definitely have access to better test data than I do at the moment, so I trust it's working as you intended :)

If there are any specific commits you would like to go on main, you should be able to:

  1. switch to main
  2. git pull to update
  3. checkout new branch (ie main_updates)
  4. git cherry pick

If the changes for main are not neatly in separated commits then it might be an annoying manual copy/paste job... Might also encounter conflicts that need resolving, but see how you go :)

Comment thread cx_asap/overall_pipelines/variable_position_pipeline.py Outdated
Comment on lines +146 to +150
logging.info(f"DEBUG: Running centroids with location={location}")
logging.info(f"DEBUG: centroid_1_atoms={self.cfg['centroid_1_atoms']}")
logging.info(f"DEBUG: centroid_2_atoms={self.cfg['centroid_2_atoms']}")
logging.info(f"DEBUG: centroid_1_symmetry={self.cfg.get('centroid_1_symmetry')}")
logging.info(f"DEBUG: centroid_2_symmetry={self.cfg.get('centroid_2_symmetry')}")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Per previous comment - if this logging is put inside the centroid_distance_analysis function you can avoid duplicate code.

Comment thread cx_asap/post_refinement_analysis/modules/ADP_analysis.py
or None if no atoms were found
"""

if isinstance(atom_names, str):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Throw a warning or error if this is not the case....????

Comment thread cx_asap/post_refinement_analysis/modules/centroids.py Outdated
Comment thread cx_asap/system_files/utils.py Outdated
self.cfg, self.sys = self.config.yaml_reload(self.test_mode)

def ref_edit(self, ins: str, MPLA_atoms: str) -> None:
def ref_edit(self, ins: str, MPLA_atoms) -> None:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Need appropriate type hint for MPLA_atoms

Comment thread cx_asap/system_files/utils.py Outdated
Comment thread cx_asap/cxasap.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yay for updating tests :)

Comment thread cx_asap/system_files/crystal_math.py
@jkclegg

jkclegg commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

changes should be done...

@jkclegg
jkclegg requested a review from amyjaynethompson June 18, 2026 00:37

@amyjaynethompson amyjaynethompson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for addressing the comments - should be ok to go into dev now :)

@jkclegg
jkclegg merged commit 429abf9 into dev Jun 23, 2026
1 check passed
@jkclegg
jkclegg deleted the cent branch July 31, 2026 02:21
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.

2 participants