[gmx-users] auto-neutralize system
João Henriques
joao.henriques.32353 at gmail.com
Fri Feb 19 12:07:26 CET 2016
Not that I know of. Anyway, that's like a couple of extra line of code...
Just read the topology and parse the total charge (that's a one-liner in
awk, for example). Then, depending on whether it's positive, negative or
zero, you just set two variables with the correct integer(s) and feed it to
genion like so:
genion ... -np $var1 -nn $var2
Imagine the net charge is +5, then var1=0 and var2=5.
Put this inside a function and you use it over and over without having to
write more code.
/J
On Fri, Feb 19, 2016 at 11:37 AM, Samuel Flores <samuelfloresc at gmail.com>
wrote:
> Guys,
>
> Is there a way you know a way to avoid using e.g. -np to explicitly
> specify number of ions? I would prefer to let GROMACS figure out how many
> ions it needs to neutralize the system. Mostly this is because I am writing
> a script to generate SLURM job files for a bunch of variants, and adding up
> the charges means more coding for me. My system is Staphylococcal Protein A
> , domain B, in solvent.
>
> I append below the sort of job file I would be having my script generate.
>
> Many thanks
>
> Sam
>
>
>
> #!/bin/bash -l
> #SBATCH -J BF18
> #SBATCH -p node
> #SBATCH -n 16
> #SBATCH -N 1
> #SBATCH --exclusive
> #SBATCH -A snic2015-1-443
> #SBATCH -t 72:00:00
>
>
> module add gromacs/5.1.1
> cd /home/samuelf/projects/SpA-ZEMu-method-upgrade/C-130-F
> # was /proj/snic2015-1-317/GROMACS/GROMACS/BF-SPA/C-130-F/
> echo 6 > temp.txt
> echo 1 >> temp.txt
>
> cat temp.txt | gmx_mpi pdb2gmx -f last.2.pdb -o last.2_processed.gro -ignh
> #6: Amber sb99 , 3 point TIP3P water model: force field was selected based
> on this benchmark article:
> http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2905107/ <
> http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2905107/>
> gmx_mpi editconf -f last.2_processed.gro -o last.2_newbox.gro -c -d 1.0
> -bt cubic
> gmx_mpi solvate -cp last.2_newbox.gro -cs spc216.gro -o last.2_solv.gro -p
> topol.top
>
> gmx_mpi grompp -f ions.mdp -c last.2_solv.gro -p topol.top -o ions.tpr
> echo 13 | gmx_mpi genion -s ions.tpr -o last.2_solv_ions.gro -p topol.top
> -pname NA -np 5
> mpirun -np 16 gmx_mpi grompp -f minim.mdp -c last.2_solv_ions.gro -p
> topol.top -o em.tpr
> mpirun -np 16 gmx_mpi mdrun -v -deffnm em
>
> gmx_mpi grompp -f nvt.mdp -c em.gro -p topol.top -o nvt.tpr
> mpirun -np 16 gmx_mpi mdrun -deffnm nvt
> gmx_mpi grompp -f npt.mdp -c nvt.gro -t nvt.cpt -p topol.top -o npt.tpr
> mpirun -np 16 gmx_mpi mdrun -deffnm npt
> gmx_mpi grompp -f md.mdp -c npt.gro -t npt.cpt -p topol.top -o md_0_1.tpr
> mpirun -np 16 gmx_mpi mdrun -deffnm md_0_1
>
>
> Samuel Coulbourn Flores
> Associate Professor
> Computational and Systems Biology Program
> Department of Cell and Molecular Biology
> Uppsala University
>
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>
More information about the gromacs.org_gmx-users
mailing list