Print Substituent/amino acid names in Result.txt - #9
Open
AmirmasoudSamadi wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
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.pyBLaDE binary record parsing to match the actual XDR record layout. - Add residue/substituent label columns to
Result.txtgeneration inGetVariance.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 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 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 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.