Compiling3SPN2
- Before compiling 3SPN2 you should compile LAMMPS successfully. Instructions for this can be found here.
- Download 3SPN2
Note:
Downloading 3SPN2
Click on USER-3SPN2 on the right-hand side of the page.
Download and save the file.
Start a terminal application and get into your downloads folder.
$ scp -r USER-3SPN2.zip username@watt.et.byu.edu:~
Enter password if needed.
Compiling 3SPN2 in LAMMPS on WATT
Sign into Watt.
$ unzip USER-3SPN2.zip
$ svn co svn://svn.icms.temple.edu/lammps-ro/trunk mylammps
Note: "mylammps" is an example name for this documentation. You can use any name you want it do not need to be "mylammps"
$ mv USER-3SPN2 mylammps/src
$ cp lammps_standard/src/angle_hybrid.cpp mylammps/src/angle_hybrid.cpp
$ cd mylammps/src/
$ make yes-REPLICA
$ make yes-RIGID
$ make yes-MOLECULE
$ make yes-USER-3SPN2
$ make yes-CLASS2
$ make mpi
Compiling 3SPN2 in LAMMPS on FSL
Sign into FSL.
$ svn co svn://svn.icms.temple.edu/lammps-ro/trunk mylammps
Note: "mylammps" is an example name for this documentation. You can use any name you want, it does not need to be "mylammps".
$ mv USER-3SPN2 mylammps/src
$ cd mylammps/src
$ module unload mpi/openmpi-1.8.4_gnu-4.9.2
$ module load mpi/openmpi_1.6.3_intel-13.0.1
You are unloading the one compiler and loading up another. After loading the new compiler and an error message comes up saying that it conflicts with the currently loaded module, unload the module that is currently loaded and retry the command.
$ module load fftw/3.3.3_mpi_openmp_sse2
There are extra features to LAMMPS that must be specified and compiled at the start if they are to be used later on. For example if you want to run replica exchange on future simulations then you have to do 'make yes-REPLICA' before compiling.
$ make yes-MOLECULE
$ make yes-USER-3SPN2
$ make yes-RIGID
$ make yes-REPLICA
$ make yes-CLASS2
For some reason the file angle_hybrid.cpp causes the compilation to error out.
$ vim angle_hybrid.cpp
Go to line 224 and change
styles[nstyles] = force->new_angle(arg[i],lmp->suffix,dummy);
to read
styles[nstyles] = force->new_angle(arg[i],1,dummy);
Go to line 348 and change
styles[m] = force->new_angle(keywords[m],lmp->suffix,dummy);
to read
styles[m] = force->new_angle(keywords[m],0,dummy);
save and exit angle_hybrid.cpp
$ make mpi
You should have an executable called "lmp_mpi" in your src directory.
Running a sample simulation for both Watt and FSL with 3SPN.2
This documentation will run a simulation on a single strand of bDNA without ions. Future documentation will be created to explain the flags used.
$ cd ~/
$ mkdir testSample
$ cd mylammps/src/
$ cp lmp_mpi ~/testSample/
$ cd USER-3SPN2/DSIM_ICNF/
$ make
You should have an executable called "icnf.exe"
$ cp icnf.exe ~/testSample
$ cd ../examples/bdna/
$ cp bdna.in ~/testSample/
$ cd ~/testSample/
Create a sequence file. This documentation will call it "seq" but you can name it what ever you want.
$ vim seq
12
ATCGATCGATCG
Save and exit
$ ./icnf.exe seq 0 0 ./ 0
Three files should be produced: in00_cvmd.psf, in00_conf.xyz, and conf_lammps.in
$ vim bdna.in
Go to line 28 and change
read_data bdna.in
to read
read_data conf_lammps.in
save and exit
$ ./lmp_mpi < bdna.in
Four files should be produced: log.cite, log.lammps, sim.log, and traj.xyz