Skip to content

Print Substituent/amino acid names in Result.txt - #9

Open
AmirmasoudSamadi wants to merge 2 commits into
RyanLeeHayes:masterfrom
AmirmasoudSamadi:unmask-the-subs
Open

Print Substituent/amino acid names in Result.txt#9
AmirmasoudSamadi wants to merge 2 commits into
RyanLeeHayes:masterfrom
AmirmasoudSamadi:unmask-the-subs

Conversation

@AmirmasoudSamadi

@AmirmasoudSamadi AmirmasoudSamadi commented Jul 16, 2026

Copy link
Copy Markdown
  • Fixed GetLambda.py's BLaDE binary parsing (was using stale xdrlib unpacking that didn't match BLaDE's actual XDR record layout)
  • Added a residue/substituent label column to Result.txt in GetVariance.py (falls back to s_ for non-residue systems like ligand fragments)
  • Fixed CMakeLists.txt to purge a stale setuptools build cache on reconfigure, so Python source edits are reliably picked up by make install
  • Resolved a merge conflict with upstream's independent xdrlib→mda_xdrlib fix by keeping GetLambda.py's frombuffer-based decoding (which needs neither), and added a comment noting the divergence from the Unpacker-based approach still used elsewhere (e.g. GetSteps.py)

Copilot AI review requested due to automatic review settings July 16, 2026 02:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves ALF postprocessing output clarity and robustness by (1) fixing BLaDE binary lambda parsing, (2) augmenting Result.txt with residue/substituent labels, and (3) ensuring staged Python installs don’t reuse stale setuptools build artifacts.

Changes:

  • Fix GetLambda.py BLaDE binary record parsing to match the actual XDR record layout.
  • Add residue/substituent label columns to Result.txt generation in GetVariance.py.
  • Purge staged setuptools build cache on CMake reconfigure to ensure edited Python sources are reinstalled.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
CMakeLists.txt Removes stale staged setuptools build cache before restaging the Python package.
alf/GetVariance.py Adds parsing of prep/*.inp to derive residue/substituent labels and writes them into Result*.txt.
alf/GetLambda.py Replaces stale xdrlib unpacking with numpy dtype-based parsing for BLaDE lambda records.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread alf/GetVariance.py
Comment on lines 182 to +186
for i in range(0,nlig):
for j in range(0,len(nsubs)):
fp.write('%2d ' % ind[i,j])
for j in range(0,len(nsubs)):
fp.write('%6s ' % reslabels[j][ind[i,j]]) # Added: residue letter+number column
Comment thread alf/GetLambda.py
Comment on lines 138 to 142
for fnmin in fnmsin:
if not os.path.exists(fnmin):
print('Error, %s does not exist, molecular dynamics probably failed, check run output and run error for clues' % (fnmin,))
# Lambda=np.loadtxt(sys.argv[ifp])
fp=open(fnmin,"rb")
fpdata=fp.read()
Comment thread alf/GetLambda.py
Comment on lines +144 to +146
lines=len(fpdata)//dtype.itemsize
records=np.frombuffer(fpdata,dtype=dtype,count=lines)
Lambdas=np.concatenate((Lambdas,records['lambdas'].astype(np.float64)),axis=0)
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