-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from comecattin/read_file
Read input file and PBC conditions
- Loading branch information
Showing
9 changed files
with
124 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -31,3 +31,11 @@ | |
*.out | ||
*.app | ||
bin/ | ||
|
||
# Results | ||
*.png | ||
*.gif | ||
*.mp4 | ||
trajectories.dat | ||
input.dat | ||
md_simulation |
This file contains 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 |
---|---|---|
@@ -1,23 +1,38 @@ | ||
# F-MD, Fortran Molecular Dynamic | ||
|
||
A simple Molecular Dynamic implementation in Fortran. | ||
|
||
## Installation | ||
|
||
To install, clone this repository: | ||
|
||
``` | ||
```bash | ||
git clone git@github.com:comecattin/F-MD.git | ||
cd F-MD | ||
``` | ||
|
||
Then compile the source: | ||
``` | ||
|
||
```bash | ||
cd src | ||
make | ||
``` | ||
|
||
## Run an MD simulation | ||
To run an MD simulation simply run `./md_simulation` in the `src` directory. | ||
|
||
Parameters for the MD simulation can be changed inside the `src/main.f90` file. Compilation is needed after making changes. | ||
To run an MD simulation simply run `./md_simulation input.dat` in the `src` directory. | ||
|
||
The file `input.dat` is the input file and contain in the following order: | ||
|
||
- The number of particles | ||
- The number of time steps | ||
- The time step | ||
- The box length | ||
|
||
An example is given in the `example_input.dat` file. | ||
|
||
## Output and plot the trajectories | ||
|
||
By default, positions along time steps are outputted in the `trajectories.dat` file. | ||
|
||
## Ouput and plot the trajectories | ||
To plot an animation of the trajectories, run `python plot_trajectories.py` in the `src` directory. | ||
To plot an animation of the trajectories, run `python plot_trajectories.py` in the `src` directory. |
This file contains 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,4 @@ | ||
50 ! Number of particles | ||
10000 ! Number of steps | ||
0.001 ! Time step | ||
10.0 ! Box length |
This file contains 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 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 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 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 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 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