-
Notifications
You must be signed in to change notification settings - Fork 48
Sdg23 add getting started page md #443
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
Merged
micaela-matta
merged 12 commits into
MDAnalysis:master
from
namiroues:sdg23-add-getting-started-page-md
Mar 25, 2025
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0688019
FIX broken links
namiroues 884c18e
add mamba instructions and refine installation quick start
namiroues 20d7e8f
Merge branch 'master' into sdg23-update-docs
namiroues 48bad02
add mamba instructions and refine installation quick start
namiroues aef7dbc
address PR review comments
namiroues 24583fb
Merge branch 'master' into sdg23-improve-website-navigation
namiroues 0f8dbda
Add 'Getting Started' page with installation, basic example, and
namiroues 1af2fcc
Update basic_example.md
micaela-matta 3fd0d69
address PR review comments
namiroues da244e1
Address PR review comments
namiroues c47fbf8
address PR review comments and restyle code block
namiroues 9161f39
restyle code block in basic example page
namiroues File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| layout: page | ||
| title: Getting Started | ||
| order: 1 | ||
| --- | ||
|
|
||
| MDAnalysis is a Python library for analyzing molecular dynamics (MD) simulations. This page will guide you through quickly installing MDAnalysis, exploring a basic example, and accessing learning resources to get started. | ||
|
|
||
| ## Installation Instructions | ||
|
|
||
| Our [Installation Quick Start]({{ site.baseurl }}/pages/installation_quick_start) guide contains instructions to get MDAnalysis up and running in a few minutes. Try this guide first. | ||
|
|
||
| For a more thorough installation with advanced options, including dependencies and environment configurations, see the [installation instructions in the User Guide]({{ site.docs.userguide.url }}/stable/installation.html). | ||
|
|
||
| ## Basic Example | ||
|
|
||
| Once MDAnalysis is installed, you can load a trajectory and perform a simple analysis. A typical usage pattern is to iterate through a trajectory and analyze | ||
| coordinates for every frame. | ||
|
|
||
| In the following example, the end-to-end distance of a protein and the radius of gyration of the backbone atoms are calculated: | ||
|
|
||
| <div class="wide-code"> | ||
| {% highlight python %} | ||
| import MDAnalysis | ||
| from MDAnalysis.tests.datafiles import PSF, DCD # test trajectory | ||
| import numpy.linalg | ||
|
|
||
| # load trajectory and topology into a Universe | ||
| u = MDAnalysis.Universe(PSF,DCD) | ||
| # from the 4AKE segid, select | ||
| # the first atom named N and the last atom named C | ||
| nterm = u.select_atoms('segid 4AKE and name N')[0] | ||
| cterm = u.select_atoms('segid 4AKE and name C')[-1] | ||
| # select the backbone atoms (AtomGroup) | ||
| bb = u.select_atoms('protein and backbone') | ||
|
|
||
| for ts in u.trajectory: # iterate through all frames | ||
| r = cterm.position - nterm.position # end-to-end vector from atom positions | ||
| d = numpy.linalg.norm(r) # end-to-end distance | ||
| rgyr = bb.radius_of_gyration() # method of AtomGroup | ||
| print("frame = {0}: d = {1} A, Rgyr = {2} A".format( | ||
| ts.frame, d, rgyr)) | ||
| {% endhighlight %} | ||
| </div> | ||
|
|
||
| ## Learning Resources | ||
|
|
||
| To find out what else you can do, head over to [Learning | ||
| MDAnalysis]({{ site.baseurl }}/pages/learning_MDAnalysis) to explore | ||
| tutorials and documentation. | ||
|
|
||
| If you have questions, visit our [Community]({{ site.baseurl }}/pages/community) page to learn about available discussion channels. Happy coding! | ||
|
|
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
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
Oops, something went wrong.
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.