-
Notifications
You must be signed in to change notification settings - Fork 25
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
lipid_unwrap.py #62
base: main
Are you sure you want to change the base?
lipid_unwrap.py #62
Conversation
Added lipid_unwrap.py to PYLOOS
This is connected to Discussion #61 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this looks good, but there are some changes needed:
- The "#!/usr/bin/env python3" line needs to be the first line of the file. Please remove that opening block of comments.
- Compose an appropriate top-level comment to replace the one that's there (lines 11-14 in the current numbering)
- Fix typos in the full help message (spaces before "." and "," instead of after. Write out periodic box. Add something saying why you would use this program (in preparation for calculating diffusion coefficients). Line 49 has an incomplete sentence. In general, you might want to run the text through a spellcheck. Check your comments too.
- I suggest running the code through a linter (eg black, autopep8). This will clean up stuff like missing blank lines before a function, etc.
- The algorithm you're using in
findFix
is really ugly. I need to think about whether there's a cleaner way to do it. All of those ifs are going to be really slow, too. - The main body of the program should be protected by
if __name__ == 'main':
- Please separate blocks of code with blank lines. Please don't double and triple the "#"
- Can you explain what you're trying to accomplish with lines 204-214? Add comments explaining it. Also, 1000 Ang probably isn't big enough to be safe -- there are already people running martini sims that are that big.
- Lines 216-220: why are you working with a copy of the system instead of just making the pdb from the current
AtomicGroup
? Why remove the bonds?
I'm sure I'll think of more comments --- I really want to clean up findFix
somehow --- but this is enough to get you started.
Cheers,
Alan
Added a top commnet for what the file does. Changed the a,b...f to one dictonary that was all the values of the tracker to the fix. added if __name__ in main . Spelling fixed(not well). Commneted on what i am doin in the trajectory making stuff. removed so silly thing about making the pdb . incresed the number of the new PBC Box
Used the code given to me by Dr.Grossfeild That moved all no function calls to after the if name in main. editted if name in main to "__main__". Removed old commnet that did not apply anymore around line 215, Added an arugment to not recenter the unwrapped trajectory. Made a 2D array instead of buibling one from scratch over time.
Alan, Kyle |
added a commnet for the fullhelp for the no_center flag
removed old way of getting the matrix for the corrianted of the lipid centers.
Fixed whitespace error
Hi Alan,
I placed the lipid_unwrap.py code that I have been working on in loos/Pacakges/Pyloos. Let me know anything that you need me to do and thank you again for all of your help. This code is used ofr simulation that hav rectaulgar boxes to unwrapp the P.B of the simulation. This should work for any selection but is intended to work for lipids. There is one assumption that the lenght of the P.B. is no greater than 1000 which should be fine for most systems. (I could add in a flag to change this if needed). I am also unsure about the change from outputting the x,y,z of each lipid center into the raidus of each point to the center of mass. If you rather have it in the x,y,z for the output I do still have a version of that code. My thinking whne doing that is that now all the points takin in the mostion of the center of mass of the system. Let me know what you need done.
Kyle