scripts/make_gromos_rtp.py !filter
share/template/template.cpp filter=copyright
share/template/README.cmakein !filter
-src/contrib/* -filter -gmx-doxygen
src/gromacs/gmxlib/nonbonded/preprocessor/gmxpreprocess.py !filter
src/gromacs/linearalgebra/gmx_blas/* !filter
src/gromacs/linearalgebra/gmx_lapack/* !filter
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+# Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+# Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
message(FATAL_ERROR "Cannot build FFTW3 automatically (GMX_BUILD_OWN_FFTW=ON) with ninja")
endif()
- add_subdirectory(src/contrib/fftw)
+ add_subdirectory(src/external/build-fftw)
include_directories(BEFORE ${${FFTW}_INCLUDE_DIRS})
# libgmxfftw is always built static, so libgromacs does not
# have a dependency on anything, so PKG_FFT should be empty
parts of this code are included in the build.
See :doc:`build-system` for some explanation about how the code in this
directory is used.
-:file:`src/contrib/`
- Contains collection of less well maintained code that may or may
- not compile. It is not included in the build.
-:file:`src/contrib/fftw/`
- As an exception to the above, this folder contains the build system code for
+:file:`src/external/build-fftw/`
+ This folder contains the build system code for
downloading and building FFTW to be included into :file:`libgromacs`.
When compiling, the include search path is set to :file:`src/`.
# FILE_PATTERNS += *.cu *.cuh
EXAMPLE_PATH = @CMAKE_SOURCE_DIR@
RECURSIVE = YES
-EXCLUDE = @CMAKE_SOURCE_DIR@/src/contrib \
- @CMAKE_SOURCE_DIR@/src/external \
+EXCLUDE = @CMAKE_SOURCE_DIR@/src/external \
@CMAKE_SOURCE_DIR@/src/gromacs/linearalgebra/gmx_blas \
@CMAKE_SOURCE_DIR@/src/gromacs/linearalgebra/gmx_lapack \
@CMAKE_SOURCE_DIR@/src/gromacs/selection/parser.cpp \
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+# Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
relpath = self._get_rel_path(rootpath)
self._dirs[relpath] = Directory(rootpath, relpath, None)
for dirpath, dirnames, filenames in os.walk(rootpath):
- if 'contrib' in dirnames:
- dirnames.remove('contrib')
if 'refdata' in dirnames:
dirnames.remove('refdata')
currentdir = self._dirs[self._get_rel_path(dirpath)]
#!/usr/bin/perl -w
+use strict;
#
# This script reads an XPLOR input file with distance restraint data
# as sometimes is found in the pdb database (http://www.pdb.org).
#
# Turn debugging off (0), or on ( > 0).
-$debug = 1;
+my $debug = 1;
# Turn atom name translation on and off
-$trans = 1;
+my $trans = 1;
-#$res0 = shift;# || die "I need the residue offset\n";
-$pdb = shift || die "I need the name of the pdb file with correct atom numbers\n";
-$core = shift || "core.ndx";
-$tbl = "$ENV{GMXDATA}/top/atom_nom.tbl";
+my $pdb = shift || die "I need the name of the pdb file with correct atom numbers\n";
+my $core = shift || "core.ndx";
+my $tbl = "$ENV{GMXDATA}/top/atom_nom.tbl";
printf "[ distance_restraints ]\n";
printf "; Read an xplor distance restraint file, and output GROMACS distance restraints.\n";
printf "; This also needs a pdb file with correct GROMACS atom numbering.\n";
printf "; I used $pdb for the atom numbers\n";
printf "; This also needs the offset in residues.\n";
-#printf "; I used $res0 for the residue offset\n";
# Read the pdb file
# If things go wrong, check whether your pdb file is read correctly.
-$natom = 0;
-$nres = 0;
-@resname = ();
+my $natom = 0;
+my $nres = 0;
+my @resname;
+my @aname;
+my @resnr;
open(PDB,$pdb) || die "Can not open file $pdb\n";
-while ($line = <PDB>) {
+while (my $line = <PDB>) {
if (index($line,"ATOM") >= 0) {
- @tmp = split(' ',$line);
+ my @tmp = split(' ',$line);
$aname[$natom] = $tmp[2];
$resnr[$natom] = $tmp[4];
if (!defined $resname[$tmp[4]]) {
printf "; I found $natom atoms in the pdb file $pdb\n";
printf "; I found $nres residues in the pdb file $pdb\n";
if ($debug > 1) {
- for ($i = 0; ($i < $natom); $i ++) {
+ for (my $i = 0; ($i < $natom); $i ++) {
printf("; %5d %5s %5s %5d\n",$i+1,$aname[$i],
$resname[$resnr[$i]],$resnr[$i]);
}
# not for content
#
open(TBL,$tbl) || die "Can not open atom-name translation table $tbl\n";
-$ntbl=0;
-while ($line = <TBL>) {
- @ttt = split('#',$line);
- @tmp = split(' ',$ttt[0]);
+my $ntbl=0;
+my @tblxplor;
+my @tblgmx;
+my @tblres;
+while (my $line = <TBL>) {
+ my @ttt = split('#',$line);
+ my @tmp = split(' ',$ttt[0]);
if ($#tmp == 3) {
# New table entry
$tblres[$ntbl] = $tmp[0];
close TBL;
printf "; Read $ntbl entries from $tbl\n";
-@templates = (
- [ "HA#", "HA1", "HA2" ],
- [ "HA*", "HA1", "HA2" ],
- [ "HB#", "HB", "HB1", "HB2" ],
- [ "HB*", "HB", "HB1", "HB2" ],
- [ "HG#", "HG", "HG1", "HG2", "HG11", "HG12", "HG13", "HG21", "HG22", "HG23" ],
- [ "HG*", "HG", "HG1", "HG2", "HG11", "HG12", "HG13", "HG21", "HG22", "HG23" ],
- [ "HG1#", "HG11", "HG12", "HG13" ],
- [ "HG1*", "HG11", "HG12", "HG13" ],
- [ "HG2#", "HG21", "HG22", "HG23" ],
- [ "HG2*", "HG21", "HG22", "HG23" ],
- [ "HD#", "HD1", "HD2", "HD11", "HD12", "HD13", "HD21", "HD22", "HD23" ],
- [ "HD*", "HD1", "HD2", "HD11", "HD12", "HD13", "HD21", "HD22", "HD23" ],
- [ "HD1#", "HD11", "HD12" ],
- [ "HD1*", "HD11", "HD12" ],
- [ "HD2#", "HD21", "HD22" ],
- [ "HD2*", "HD21", "HD22" ],
- [ "HE#", "HE", "HE1", "HE2" ],
- [ "HE*", "HE", "HE1", "HE2" ],
- [ "HH#", "HH11", "HH12", "HH21", "HH22" ],
- [ "HH*", "HH11", "HH12", "HH21", "HH22" ],
- [ "HZ#", "HZ", "HZ1", "HZ2", "HZ3" ],
- [ "HZ*", "HZ", "HZ1", "HZ2", "HZ3" ],
- [ "HN", "H" ]
+my $default = "XXX";
+
+my @templates = (
+ [ $default, "HA#", "HA1", "HA2" ],
+ [ $default, "HA*", "HA1", "HA2" ],
+ [ $default, "HB#", "HB", "HB1", "HB2" ],
+ [ $default, "HB*", "HB", "HB1", "HB2" ],
+ [ $default, "HG#", "HG", "HG1", "HG2", "HG11", "HG12", "HG13", "HG21", "HG22", "HG23" ],
+ [ $default, "HG*", "HG", "HG1", "HG2", "HG11", "HG12", "HG13", "HG21", "HG22", "HG23" ],
+ [ $default, "HG1#", "HG11", "HG12", "HG13" ],
+ [ $default, "HG1*", "HG11", "HG12", "HG13" ],
+ [ $default, "HG2#", "HG21", "HG22", "HG23" ],
+ [ $default, "HG2*", "HG21", "HG22", "HG23" ],
+ [ $default, "HD#", "HD1", "HD2", "HD11", "HD12", "HD13", "HD21", "HD22", "HD23" ],
+ [ $default, "HD*", "HD1", "HD2", "HD11", "HD12", "HD13", "HD21", "HD22", "HD23" ],
+ [ $default, "HD1#", "HD11", "HD12" ],
+ [ "ILE", "HD1*", "HD1", "HD2", "HD3" ],
+ [ $default, "HD1*", "HD11", "HD12" ],
+ [ $default, "HD2#", "HD21", "HD22" ],
+ [ $default, "HD2*", "HD21", "HD22" ],
+ [ $default, "HE#", "HE", "HE1", "HE2" ],
+ [ "GLN", "HE*", "HE21", "HE22" ],
+ [ $default, "HE*", "HE", "HE1", "HE2" ],
+ [ $default, "HE2*", "HE2", "HE21", "HE22" ],
+ [ $default, "HH#", "HH11", "HH12", "HH21", "HH22" ],
+ [ $default, "HH*", "HH11", "HH12", "HH21", "HH22" ],
+ [ $default, "HZ#", "HZ", "HZ1", "HZ2", "HZ3" ],
+ [ $default, "HZ*", "HZ", "HZ1", "HZ2", "HZ3" ],
+ [ $default, "HN", "H" ]
);
-$ntranslated = 0;
-$nuntransltd = 0;
+my $ntranslated = 0;
+my $nuntransltd = 0;
sub transl_aname {
my $resnm = shift;
my $atom = shift;
}
$nuntransltd++;
if ($debug > 1) {
- printf "; No name change for $resname[$resnr] $atom\n";
+ printf "; No name change for $resnm $atom\n";
}
return $atom;
}
die("No residue name for residue $rnum") if (!defined ($resname[$rnum]));
for (my $tt=0; (($tt <= $#templates) && ($bdone == 0)); $tt++) {
- $templ = $templates[$tt];
- if ($atom eq $templ->[0]) {
- for ($jj = 1; ($jj <= $#{$templ}); $jj++) {
+ my $templ = $templates[$tt];
+ if (($resname[$rnum] eq $templ->[0] ||
+ $default eq $templ->[0]) &&
+ ($atom eq $templ->[1])) {
+ for ($jj = 2; ($jj <= $#{$templ}); $jj++) {
push @atoms, transl_aname($resname[$rnum],$templ->[$jj]);
}
$bdone = 1;
if ($debug > 0) {
my $natom = $#atoms+1;
printf("; Found $natom elements for atom $resname[$rnum] %d $atom:",
- $rnum+1);
- for $aa ( @atoms ) {
+ $rnum);
+ for my $aa ( @atoms ) {
printf " $aa";
}
printf "\n";
if ($debug > 1) {
printf "; There are $#templates template entries\n";
- for ($tt=0; ($tt <= $#templates); $tt++) {
- $templ = $templates[$tt];
- $ntempl = $#{$templ};
- printf "; Item $tt ($templates[$tt][0]) has $ntempl entries\n";
+ for (my $tt=0; ($tt <= $#templates); $tt++) {
+ my $templ = $templates[$tt];
+ my $ntempl = $#{$templ};
+ printf "; Item $tt ($templates[$tt][0] $templates[$tt][1]) has $ntempl entries\n";
}
}
# This index file holds numbers of restraints involving core atoms
-@protcore = ( "H", "HN", "HA", "HA1", "HA2", "HB", "HB1", "HB2", "HB3", "HG", "HG1", "HG2", "HG3", "N", "O" );
+my @protcore = ( "H", "HN", "HA", "HA1", "HA2", "HB", "HB1", "HB2", "HB3", "HG", "HG1", "HG2", "HG3", "N", "O" );
open(CORE,">$core") || die "Can not open $core\n";
print CORE "[ core-restraints ]\n";
-$ncore = 0;
+my $ncore = 0;
-$myindex = 0;
-$linec = 0;
-$npair = 0;
-$nunresolved = 0;
-while ($line = <STDIN>) {
- @ttt = split('!',$line);
- if ((index($ttt[0],"assign") >= 0) && (index($ttt[0],"!assign") < 0)) {
- @tmp = split('\(',$ttt[0]);
+my $myindex = 0;
+my $linec = 0;
+my $npair = 0;
+my $nunresolved = 0;
+while (my $line = <STDIN>) {
+ my @ttt = split('!',$line);
+ if (index($ttt[0], "dihedral") >= 0) {
+ last;
+ }
+ elsif ((index($ttt[0],"assign") >= 0) && (index($ttt[0],"!assign") < 0)) {
+ my @tmp = split('\(',$ttt[0]);
# Find first argument
+ my $rhaak = undef;
if (($rhaak = index($tmp[1],')')) < 0) {
printf "No ) in '$tmp[1]'\n";
}
- $atres1 = substr($tmp[1],0,$rhaak);
- @at1 = split('or',$atres1);
+ my $atres1 = substr($tmp[1],0,$rhaak);
+ my @at1 = split('or',$atres1);
# Find second argument
if (($rhaak = index($tmp[2],')')) < 0) {
printf "No ) in '$tmp[2]'\n";
}
- $atres2 = substr($tmp[2],0,$rhaak);
- @at2 = split('or',$atres2);
+ my $atres2 = substr($tmp[2],0,$rhaak);
+ my @at2 = split('or',$atres2);
- @expdata = split('\)',$tmp[2]);
- @dist = split(' ',$expdata[1]);
+ my @expdata = split('\)',$tmp[2]);
+ my @dist = split(' ',$expdata[1]);
- $bOK = 0;
- $bCore = 1;
- foreach $a1 ( @at1 ) {
- @info1 = split(' ',$a1);
- $r1 = $info1[1];
- @atoms1 = expand_template($info1[4],$r1);
+ my $bOK = 0;
+ my $bCore = 1;
+ foreach my $a1 ( @at1 ) {
+ my @info1 = split(' ',$a1);
+ my $r1 = $info1[1];
+ my @atoms1 = expand_template($info1[4],$r1);
- foreach $a2 ( @at2 ) {
- @info2 = split(' ',$a2);
- $r2 = $info2[1];
- @atoms2 = expand_template($info2[4],$r2);
+ foreach my $a2 ( @at2 ) {
+ my @info2 = split(' ',$a2);
+ my $r2 = $info2[1];
+ my @atoms2 = expand_template($info2[4],$r2);
+ my $i = undef;
for ($i = 0; ($i < $natom) && ($resnr[$i] < $r1); $i++) { ; }
for ( ; ($i < $natom) && ($resnr[$i] == $r1); $i++) {
- foreach $ii ( @atoms1 ) {
+ foreach my $ii ( @atoms1 ) {
if ($ii eq $aname[$i]) {
- $bCoreI = 0;
- for $pp ( @protcore ) {
+ my $bCoreI = 0;
+ for my $pp ( @protcore ) {
if ($ii eq $pp) {
$bCoreI = 1;
}
}
-
+ my $j = undef;
for ($j = 0; ($j < $natom) && ($resnr[$j] < $r2); $j++) { ; }
for ( ; ($j < $natom) && ($resnr[$j] == $r2); $j++) {
- foreach $jj ( @atoms2 ) {
+ foreach my $jj ( @atoms2 ) {
if ($jj eq $aname[$j]) {
- $dd = 0.1*$dist[0];
- $dminus = 0.1*$dist[1];
- $dplus = 0.1*$dist[2];
- $low = $dd-$dminus;
- $up1 = $dd+$dplus;
- $up2 = $up1+1;
+ my $dd = 0.1*$dist[0];
+ my $dminus = 0.1*$dist[1];
+ my $dplus = 0.1*$dist[2];
+ my $low = $dd-$dminus;
+ my $up1 = $dd+$dplus;
+ my $up2 = $up1+1;
printf("%5d %5d %5d %5d %5d %7.3f %7.3f %7.3f 1.0; res $r1 $ii - res $r2 $jj\n",$i+1,$j+1,1,$myindex,1,$low,$up1,$up2);
# Do some checks
$bOK = 1;
- $bCoreJ = 0;
- for $pp ( @protcore ) {
+ my $bCoreJ = 0;
+ for my $pp ( @protcore ) {
if ($jj eq $pp) {
$bCoreJ = 1;
}
ILE HG21 HG21 1HG2
ILE HG22 HG22 2HG2
ILE HG23 HG23 3HG2
-ILE HD11 HD11 1HD1
-ILE HD12 HD12 2HD1
-ILE HD13 HD13 3HD1
+ILE HD1 HD1 HD1
+ILE HD2 HD2 HD2
+ILE HD3 HD3 HD3
ILE C C C
ILE CA CA CA
ILE CB CB CB
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+# Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
add_subdirectory(gromacs)
add_subdirectory(programs)
-
-if (NOT GMX_FAHCORE)
- add_subdirectory(contrib)
-endif()
+++ /dev/null
-set(CONTRIB_PROGRAMS
- #add here any programs you want to compile
-
-)
-
-foreach(PROG ${CONTRIB_PROGRAMS})
- add_executable(${PROG} ${PROG}.c ${NGMX_COMMON_SOURCE})
- set_target_properties(${PROG} PROPERTIES OUTPUT_NAME "${PROG}${GMX_BINARY_SUFFIX}")
-endforeach(PROG)
+++ /dev/null
-
-This directory contains programs and scripts contributed by the
-GROMACS developers and users. It is not really officially supported
-or documented, so if there are problems your best bet is probably
-either the mailing lists or to contact the author listed in the file.
-
-To add a program, you should edit CMakeLists.txt.
-
-
-
- The GROMACS Crew
\ No newline at end of file
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.3.99_development_20071104
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2006, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Groningen Machine for Chemical Simulation
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "typedefs.h"
-#include "gromacs/math/vec.h"
-#include "txtdump.h"
-
-void calc_force(int natom,rvec f[],rvec fff[])
-{
- int i,j,m;
- int jindex[] = { 0, 5, 10};
- rvec dx,df;
- real msf1,msf2;
-
- for(j=0; (j<2); j++) {
- clear_rvec(fff[j]);
- for(i=jindex[j]; (i<jindex[j+1]); i++) {
- for(m=0; (m<DIM); m++) {
- fff[j][m] += f[i][m];
- }
- }
- }
-
- msf1 = iprod(fff[0],fff[0]);
- msf2 = iprod(fff[1],fff[1]);
- if (debug) {
- pr_rvecs(debug,0,"force",f,natom);
-
- fprintf(debug,"FMOL: %10.3f %10.3f %10.3f %10.3f %10.3f %10.3f\n",
- fff[0][XX],fff[0][YY],fff[0][ZZ],fff[1][XX],fff[1][YY],fff[1][ZZ]);
- fprintf(debug,"RMSF: %10.3e %10.3e\n",msf1,msf2);
- }
-}
-
-
-void calc_f_dev(int natoms,real charge[],rvec x[],rvec f[],
- t_idef *idef,real *xiH,real *xiS)
-{
- enum { wwwO, wwwH1, wwwH2, wwwS, wwwNR };
- int lj_index[wwwNR] = { 0, 4, 4, 8 };
- real rmsf,dFH,dFS,dFO,dr_14;
- real q[wwwNR],c6[wwwNR],c12[wwwNR],c12ratio;
- rvec fff[2],dx;
- int i,j,aj;
-
- for(i=0; (i<wwwNR); i++) {
- q[i] = charge[i];
- c12[i] = idef->iparams[lj_index[i]].lj.c12;
- c6[i] = idef->iparams[lj_index[i]].lj.c6;
- }
-
- calc_force(natoms,f,fff);
- rmsf = norm(fff[0]);
- dFS = 0;
- dFH = 0;
- dFO = 0;
- for(i=0; (i<4); i++) {
- for(j=4; (j<8); j++) {
- if (c12[i] != 0) {
- rvec_sub(x[i],x[j],dx);
- aj = j % 4;
- dr_14 = pow(iprod(dx,dx),-7);
- c12ratio = -12*sqrt(c12[aj]/c12[i])*dr_14*iprod(fff[0],dx);
-
- switch (i) {
- case wwwH1:
- case wwwH2:
- dFH += c12ratio;
- break;
- case wwwS:
- dFS += c12ratio;
- break;
- case wwwO:
- dFS += c12ratio;
- break;
- }
- }
- }
- }
-
- if (debug) {
- fprintf(debug,"FFF: dFS=%10.3e, dFH=%10.3e, dFO=%10.3e, rmsf=%10.3e\n",
- dFS,dFH,dFO,rmsf);
- }
- if (dFH == 0)
- *xiH = 1;
- else
- *xiH=rmsf/(10*c12[wwwH1]*dFH);
-
- if (dFS == 0)
- *xiS = 1;
- else
- *xiS=rmsf/(10*c12[wwwS]*dFS);
-}
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * GROwing Monsters And Cloning Shrimps
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "ns.h"
-#include "gromacs/utility/smalloc.h"
-#include "wnblist.h"
-#include "gromacs/utility/futil.h"
-#include "macros.h"
-#include "gromacs/commandline/pargs.h"
-#include "copyrite.h"
-#include "gromacs/fileio/confio.h"
-#include "gromacs/pbcutil/pbc.h"
-#include "gromacs/math/vec.h"
-
-int main(int argc,char *argv[])
-{
- static char *desc[] = {
- "[TT]compnl[tt] compares two neighborlists as generated by [TT]mdrun[tt]",
- "in the log file, when the environment variable DUMPNL is set to",
- "a number larger than 0. [TT]compnl[tt] is mainly used for debugging the",
- "[TT]mdrun[tt] internals and not for end-users."
- };
- FILE *in,*out;
- int i,j,nmiss,mod;
- char **fn,title[256];
- int ***mat,nnb;
- real mb;
- gmx_bool bConf;
- rvec *x = NULL;
- rvec dx;
- matrix box;
- t_atoms atoms;
- t_pbc pbc;
-
- t_filenm fnm[] = {
- { efLOG, "-f1", NULL, ffREAD },
- { efLOG, "-f2", NULL, ffREAD },
- { efOUT, "-o", "compnl", ffWRITE },
- { efSTX, "-c", NULL, ffOPTRD }
- };
-#define NFILE asize(fnm)
- static int natoms=648;
- static gmx_bool bSymm=TRUE;
- static t_pargs pa[] = {
- { "-nat", FALSE, etINT, { &natoms }, "Number of atoms" },
- { "-symm", FALSE, etBOOL,{ &bSymm }, "Symmetrize the matrices" },
- };
-
- CopyRight(stderr,argv[0]);
- parse_common_args(&argc,argv,0,NFILE,fnm,asize(pa),pa,
- asize(desc),desc,0,NULL);
-
- bConf = (opt2bSet("-c",NFILE,fnm));
- if (bConf) {
- get_stx_coordnum (opt2fn("-c",NFILE,fnm),&natoms);
- init_t_atoms(&atoms,natoms,FALSE);
- snew(x,natoms);
- read_stx_conf(opt2fn("-c",NFILE,fnm),title,&atoms,x,NULL,box);
- set_pbc(&pbc,box);
- }
- snew(fn,2);
- fn[0] = opt2fn("-f1",NFILE,fnm);
- fn[1] = opt2fn("-f2",NFILE,fnm);
-
- snew(mat,2);
- out = gmx_fio_fopen(ftp2fn(efOUT,NFILE,fnm),"w");
- mb = sizeof(int)*sqr(natoms/1024.0);
- for(i=0; (i<2); i++) {
- in = gmx_fio_fopen(fn[i],"r");
- fprintf(stderr,"Reading %s\n",fn[i]);
- fprintf(out, "Reading %s\n",fn[i]);
- fprintf(stderr,"Going to allocate %.0f Mb of memory\n",mb);
- fprintf(out, "Going to allocate %.0f Mb of memory\n",mb);
- snew(mat[i],natoms);
- for(j=0; (j<natoms); j++)
- snew(mat[i][j],natoms);
- nnb = read_nblist(in,out,mat[i],natoms,bSymm);
- gmx_fio_fclose(in);
- fprintf(stderr,"Interaction matrix %d has %d entries\n",i,nnb);
- fprintf(out, "Interaction matrix %d has %d entries\n",i,nnb);
- }
- fprintf(stderr,"Comparing Interaction Matrices\n");
- mod=1;
- nmiss = 0;
- for(i=0; (i<natoms); i+=mod) {
- for(j=0; (j<natoms); j+=mod) {
- if (mat[0][i][j] != mat[1][i][j]) {
- fprintf(out,"i: %5d, j: %5d, shift[%s]: %3d, shift[%s]: %3d",
- i,j,fn[0],mat[0][i][j]-1,fn[1],mat[1][i][j]-1);
- if (bConf) {
- pbc_dx(&pbc,x[i],x[j],dx);
- fprintf(out," dist: %8.3f\n",norm(dx));
- }
- else
- fprintf(out,"\n");
- nmiss++;
- }
- }
- }
- fprintf(out,"There were %d mismatches\n",nmiss);
- fprintf(out,"Done.\n");
- gmx_fio_fclose(out);
- fprintf(stderr,"There were %d mismatches\n",nmiss);
- fprintf(stderr,"Finished\n");
-
- gmx_thanx(stdout);
-
- return 0;
-}
-
-
-
+++ /dev/null
-/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*-
- *
- * This source code is NOT REALLY part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 4.2.5
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * Author: do_multiprot was written by Ran Friedman <r.friedman@bioc.uzh.ch>
- *
- * And Hey:
- * Green Red Orange Magenta Azure Cyan Skyblue
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "typedefs.h"
-#include "macros.h"
-#include "gromacs/utility/smalloc.h"
-#include "gromacs/commandline/pargs.h"
-#include "copyrite.h"
-#include "gromacs/fileio/pdbio.h"
-#include "gromacs/utility/fatalerror.h"
-#include "gromacs/fileio/xvgr.h"
-#include "gromacs/topology/index.h"
-#include "gstat.h"
-#include "gromacs/fileio/tpxio.h"
-#include "viewit.h"
-#include "gbutil.h"
-#include "gromacs/math/vec.h"
-#include "gromacs/fileio/confio.h"
-
-typedef struct {
- int resnr;
- int count;
-} t_countres;
-
-static void process_multiprot_output(const char *fn, real *rmsd, int *nres, rvec rotangles,
- rvec translation, bool bCountres, t_countres *countres)
-{
- FILE *mpoutput;
- char line[256];
- char *string;
- int i=0,j=0,res;
-
- (*rmsd)=-1;
- (*nres)=0;
- mpoutput=gmx_ffopen (fn,"r");
-
- if (bCountres) {
- do {
- fgets(line, 256, mpoutput);
- } while (strstr(line,"Match List") == NULL);
- fgets(line, 256, mpoutput);
- do {
- string = strtok (line,".");
- while (i<2 && string != NULL) {
- string = strtok (NULL,". ");
- i++;
- }
- i=0;
- res=atoi(string);
- if (res > 0) {
- while (countres[j].resnr!=res)
- j++;
- countres[j].count++;
- }
- fgets(line, 256, mpoutput);
- } while (strstr(line,"End of Match List") == NULL);
- rewind(mpoutput);
- }
- do {
- fgets(line, 256, mpoutput);
- } while (strstr(line,"Trans : ") == NULL);
-
- string = strtok (line," :");
- string = strtok (NULL," ");
- while (i<3 && string != NULL) {
- string = strtok (NULL," ");
- rotangles[i]=atof(string);
- i++;
- }
- i=0;
- while (i<3 && string != NULL) {
- string = strtok (NULL," ");
- translation[i]=atof(string)/10;
- i++;
- }
- if (i!=3) {
- gmx_warning("Not enough values for rotation and translation vectors in the output of multiprot");
- }
-
- rotangles[YY]=rotangles[YY]*(-1);
-
- while ((*rmsd) <0) {
- fgets(line, 256, mpoutput);
- if (strstr(line,"RMSD : ") != NULL) {
- string = strtok (line,":");
- string = strtok (NULL,":");
- (*rmsd)=atof(string)/10;
- }
- }
- while (!(*nres)) {
- fgets(line,256, mpoutput);
- if (strstr(line,"Match List") != NULL) {
- string = strtok (line,":");
- string = strtok (NULL,":");
- (*nres) = atoi(string);
- }
- }
- gmx_ffclose(mpoutput);
-}
-
-int main(int argc,char *argv[])
-{
- const char *desc[] = {
- "[TT]do_multiprot[tt] ",
- "reads a trajectory file and aligns it to a reference structure ",
- "each time frame",
- "calling the multiprot program. This allows you to use a reference",
- "structure whose sequence is different than that of the protein in the ",
- "trajectory, since the alignment is based on the geometry, not sequence.",
- "The output of [TT]do_multiprot[tt] includes the rmsd and the number of residues",
- "on which it was calculated.",
- "[PAR]",
- "An aligned trajectory file is generated with the [TT]-ox[tt] option.[PAR]",
- "With the [TT]-cr[tt] option, the number of hits in the alignment is given",
- "per residue. This number can be between 0 and the number of frames, and",
- "indicates the structural conservation of this residue.[PAR]",
- "If you do not have the [TT]multiprot[tt] program, get it. [TT]do_multiprot[tt] assumes",
- "that the [TT]multiprot[tt] executable is [TT]/usr/local/bin/multiprot[tt]. If this is ",
- "not the case, then you should set an environment variable [BB]MULTIPROT[bb]",
- "pointing to the [TT]multiprot[tt] executable, e.g.: [PAR]",
- "[TT]setenv MULTIPROT /usr/MultiProtInstall/multiprot.Linux[tt][PAR]",
- "Note that at the current implementation only binary alignment (your",
- "molecule to a reference) is supported. In addition, note that the ",
- "by default [TT]multiprot[tt] aligns the two proteins on their C-alpha carbons.",
- "and that this depends on the [TT]multiprot[tt] parameters which are not dealt ",
- "with here. Thus, the C-alpha carbons is expected to give the same "
- "results as choosing the whole protein and will be slightly faster.[PAR]",
- "For information about [TT]multiprot[tt], see:",
- "http://bioinfo3d.cs.tau.ac.il/MultiProt/.[PAR]"
- };
- static bool bVerbose;
- t_pargs pa[] = {
- { "-v", FALSE, etBOOL, {&bVerbose},
- "HIDDENGenerate miles of useless information" }
- };
-
- const char *bugs[] = {
- "The program is very slow, since multiprot is run externally"
- };
-
- t_trxstatus *status;
- t_trxstatus *trxout=NULL;
- FILE *tapein,*fo,*frc,*tmpf,*out=NULL,*fres=NULL;
- const char *fnRef;
- const char *fn="2_sol.res";
- t_topology top;
- int ePBC;
- t_atoms *atoms,ratoms,useatoms;
- t_trxframe fr;
- t_pdbinfo p;
- int nres,nres2,nr0;
- real t;
- int i,j,natoms,nratoms,nframe=0,model_nr=-1;
- int cur_res,prev_res;
- int nout;
- t_countres *countres=NULL;
- matrix box,rbox;
- int gnx;
- char *grpnm,*ss_str;
- atom_id *index;
- rvec *xp,*x,*xr;
- char pdbfile[32],refpdb[256],title[256],rtitle[256],filemode[5];
- char out_title[256];
- char multiprot[256],*mptr;
- int ftp;
- int outftp=-1;
- real rmsd;
- bool bTrjout,bCountres;
- const char *TrjoutFile=NULL;
- output_env_t oenv;
- static rvec translation={0,0,0},rotangles={0,0,0};
- gmx_rmpbc_t gpbc=NULL;
-
- t_filenm fnm[] = {
- { efTRX, "-f", NULL, ffREAD },
- { efTPS, NULL, NULL, ffREAD },
- { efNDX, NULL, NULL, ffOPTRD },
- { efSTX, "-r", NULL , ffREAD },
- { efXVG, "-o", "rmss", ffWRITE },
- { efXVG, "-rc", "rescount", ffWRITE},
- { efXVG, "-cr", "countres", ffOPTWR},
- { efTRX, "-ox", "aligned", ffOPTWR }
- };
-#define NFILE asize(fnm)
-
- CopyRight(stderr,argv[0]);
- parse_common_args(&argc,argv,PCA_CAN_TIME | PCA_CAN_VIEW | PCA_TIME_UNIT,
- NFILE,fnm, asize(pa),pa, asize(desc),desc,
- asize(bugs),bugs,&oenv
- );
- fnRef=opt2fn("-r",NFILE,fnm);
- bTrjout = opt2bSet("-ox",NFILE,fnm);
- bCountres= opt2bSet("-cr",NFILE,fnm);
-
- if (bTrjout) {
- TrjoutFile = opt2fn_null("-ox",NFILE,fnm);
- }
-
- read_tps_conf(ftp2fn(efTPS,NFILE,fnm),title,&top,&ePBC,&xp,NULL,box,FALSE);
- gpbc = gmx_rmpbc_init(&top.idef,ePBC,top.atoms.nr,box);
- atoms=&(top.atoms);
-
- ftp=fn2ftp(fnRef);
-
- get_stx_coordnum(fnRef,&nratoms);
- init_t_atoms(&ratoms,nratoms,TRUE);
- snew(xr,nratoms);
- read_stx_conf(fnRef,rtitle,&ratoms,xr,NULL,&ePBC,rbox);
-
- if (bVerbose) {
- fprintf(stderr,"Read %d atoms\n",atoms->nr);
- fprintf(stderr,"Read %d reference atoms\n",ratoms.nr);
- }
- if (bCountres) {
- snew(countres,ratoms.nres);
- j=0;
- cur_res=0;
- for (i=0;i<ratoms.nr;i++) {
- prev_res=cur_res;
- cur_res=ratoms.atom[i].resind;
- if (cur_res != prev_res) {
- countres[j].resnr=cur_res;
- countres[j].count=0;
- j++;
- }
- }
- }
- get_index(atoms,ftp2fn_null(efNDX,NFILE,fnm),1,&gnx,&index,&grpnm);
- nres=0;
- nr0=-1;
- for(i=0; (i<gnx); i++) {
- if (atoms->atom[index[i]].resind != nr0) {
- nr0=atoms->atom[index[i]].resind;
- nres++;
- }
- }
- fprintf(stderr,"There are %d residues in your selected group\n",nres);
-
- strcpy(pdbfile,"ddXXXXXX");
- gmx_tmpnam(pdbfile);
- if ((tmpf = fopen(pdbfile,"w")) == NULL) {
- sprintf(pdbfile,"%ctmp%cfilterXXXXXX",DIR_SEPARATOR,DIR_SEPARATOR);
- gmx_tmpnam(pdbfile);
- if ((tmpf = fopen(pdbfile,"w")) == NULL) {
- gmx_fatal(FARGS,"Can not open tmp file %s",pdbfile);
- }
- }
- else {
- gmx_ffclose(tmpf);
- }
-
- if (ftp != efPDB) {
- strcpy(refpdb,"ddXXXXXX");
- gmx_tmpnam(refpdb);
- strcat(refpdb,".pdb");
- write_sto_conf(refpdb,rtitle,&ratoms,xr,NULL,ePBC,rbox);
- }
- else {
- strcpy(refpdb,fnRef);
- }
-
- if ((mptr=getenv("MULTIPROT")) == NULL) {
- mptr="/usr/local/bin/multiprot";
- }
- if (!gmx_fexist(mptr)) {
- gmx_fatal(FARGS,"MULTIPROT executable (%s) does not exist (use setenv MULTIPROT)",
- mptr);
- }
- sprintf (multiprot,"%s %s %s > /dev/null %s",
- mptr, refpdb, pdbfile, "2> /dev/null");
-
- if (bVerbose)
- fprintf(stderr,"multiprot cmd='%s'\n",multiprot);
-
- if (!read_first_frame(oenv,&status,ftp2fn(efTRX,NFILE,fnm),&fr,TRX_READ_X))
- gmx_fatal(FARGS,"Could not read a frame from %s",ftp2fn(efTRX,NFILE,fnm));
- natoms = fr.natoms;
-
- if (bTrjout) {
- nout=natoms;
- /* open file now */
- outftp=fn2ftp(TrjoutFile);
- if (bVerbose)
- fprintf(stderr,"Will write %s: %s\n",ftp2ext(ftp),ftp2desc(outftp));
- strcpy(filemode,"w");
- switch (outftp) {
- case efXTC:
- case efG87:
- case efTRR:
- case efTRJ:
- out=NULL;
- trxout = open_trx(TrjoutFile,filemode);
- break;
- case efGRO:
- case efG96:
- case efPDB:
- /* Make atoms struct for output in GRO or PDB files */
- /* get memory for stuff to go in pdb file */
- init_t_atoms(&useatoms,nout,FALSE);
- sfree(useatoms.resinfo);
- useatoms.resinfo=atoms->resinfo;
- for(i=0;(i<nout);i++) {
- useatoms.atomname[i]=atoms->atomname[i];
- useatoms.atom[i]=atoms->atom[i];
- useatoms.nres=max(useatoms.nres,useatoms.atom[i].resind+1);
- }
- useatoms.nr=nout;
- out=gmx_ffopen(TrjoutFile,filemode);
- break;
- }
- }
-
- if (natoms > atoms->nr) {
- gmx_fatal(FARGS,"\nTrajectory does not match topology!");
- }
- if (gnx > natoms) {
- gmx_fatal(FARGS,"\nTrajectory does not match selected group!");
- }
-
- fo = xvgropen(opt2fn("-o",NFILE,fnm),"RMSD","Time (ps)","RMSD (nm)",oenv);
- frc = xvgropen(opt2fn("-rc",NFILE,fnm),"Number of Residues in the alignment","Time (ps)","Residues",oenv);
-
- do {
- t = output_env_conv_time(oenv,fr.time);
- gmx_rmpbc(gpbc,natoms,fr.box,fr.x);
- tapein=gmx_ffopen(pdbfile,"w");
- write_pdbfile_indexed(tapein,NULL,atoms,fr.x,ePBC,fr.box,' ',-1,gnx,index,NULL,TRUE);
- gmx_ffclose(tapein);
- system(multiprot);
- remove(pdbfile);
- process_multiprot_output(fn, &rmsd, &nres2,rotangles,translation,bCountres,countres);
- fprintf(fo,"%12.7f",t);
- fprintf(fo," %12.7f\n",rmsd);
- fprintf(frc,"%12.7f",t);
- fprintf(frc,"%12d\n",nres2);
- if (bTrjout) {
- rotate_conf(natoms,fr.x,NULL,rotangles[XX],rotangles[YY],rotangles[ZZ]);
- for(i=0; i<natoms; i++) {
- rvec_inc(fr.x[i],translation);
- }
- switch(outftp) {
- case efTRJ:
- case efTRR:
- case efG87:
- case efXTC:
- write_trxframe(trxout,&fr,NULL);
- break;
- case efGRO:
- case efG96:
- case efPDB:
- sprintf(out_title,"Generated by do_multiprot : %s t= %g %s",
- title,output_env_conv_time(oenv,fr.time),output_env_get_time_unit(oenv));
- switch(outftp) {
- case efGRO:
- write_hconf_p(out,out_title,&useatoms,prec2ndec(fr.prec),
- fr.x,NULL,fr.box);
- break;
- case efPDB:
- fprintf(out,"REMARK GENERATED BY DO_MULTIPROT\n");
- sprintf(out_title,"%s t= %g %s",title,output_env_conv_time(oenv,fr.time),output_env_get_time_unit(oenv));
- /* if reading from pdb, we want to keep the original
- model numbering else we write the output frame
- number plus one, because model 0 is not allowed in pdb */
- if (ftp==efPDB && fr.step > model_nr) {
- model_nr = fr.step;
- }
- else {
- model_nr++;
- }
- write_pdbfile(out,out_title,&useatoms,fr.x,ePBC,fr.box,' ',model_nr,NULL,TRUE);
- break;
- case efG96:
- fr.title = out_title;
- fr.bTitle = (nframe == 0);
- fr.bAtoms = FALSE;
- fr.bStep = TRUE;
- fr.bTime = TRUE;
- write_g96_conf(out,&fr,-1,NULL);
- }
- break;
- }
- }
- nframe++;
- } while(read_next_frame(oenv,status,&fr));
- if (bCountres) {
- fres= xvgropen(opt2fn("-cr",NFILE,fnm),"Number of frames in which the residues are aligned to","Residue","Number",oenv);
- for (i=0;i<ratoms.nres;i++) {
- fprintf(fres,"%10d %12d\n",countres[i].resnr,countres[i].count);
- }
- gmx_ffclose(fres);
- }
- gmx_ffclose(fo);
- gmx_ffclose(frc);
- fprintf(stderr,"\n");
- close_trx(status);
- if (trxout != NULL) {
- close_trx(trxout);
- }
- else if (out != NULL) {
- gmx_ffclose(out);
- }
- view_all(oenv,NFILE, fnm);
- sfree(xr);
- if (bCountres) {
- sfree(countres);
- }
- free_t_atoms(&ratoms,TRUE);
- if (bTrjout) {
- if (outftp==efPDB || outftp==efGRO || outftp==efG96) {
- free_t_atoms(&useatoms,TRUE);
- }
- }
- gmx_thanx(stderr);
- return 0;
-}
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.3.99_development_20071104
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2006, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Groningen Machine for Chemical Simulation
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include "errno.h"
-#include "typedefs.h"
-#include "gromacs/utility/cstringutil.h"
-#include "macros.h"
-#include "gromacs/utility/smalloc.h"
-#include "gromacs/commandline/pargs.h"
-#include "copyrite.h"
-#include "gromacs/fileio/confio.h"
-#include "gromacs/utility/fatalerror.h"
-#include "gromacs/fileio/xvgr.h"
-#include "gstat.h"
-#include "gromacs/topology/index.h"
-#include "gromacs/fileio/pdbio.h"
-
-void cat(FILE *out,char *fn,real t)
-{
- FILE *in;
- char *ptr,buf[256];
- int anr,rnr;
- char anm[24],rnm[24];
- double f1,f2,f3,f4,f5,f6;
-
- in=gmx_ffopen(fn,"r");
- while ((ptr=fgets2(buf,255,in)) != NULL) {
- sscanf(buf,"%d%d%s%s%lf%lf%lf%lf%lf%lf",
- &anr,&rnr,rnm,anm,&f1,&f2,&f3,&f4,&f5,&f6);
- fprintf(out,"%8g %10g %10g %10g %10g %10g %10g %s%d-%s%d\n",
- t,f6,f1,f2,f3,f4,f5,rnm,rnr,anm,anr);
- }
- /*if ((int)strlen(buf) > 0)
- fprintf(out,"%s\n",buf);*/
- fflush(out);
- gmx_ffclose(in);
-}
-
-int main(int argc,char *argv[])
-{
- static char *desc[] = {
- "[TT]do_shift[tt] reads a trajectory file and computes the chemical",
- "shift for each time frame (or every [BB]dt[bb] ps) by",
- "calling the 'total' program. If you do not have the total program,",
- "get it. do_shift assumes that the total executable is in",
- "[TT]/home/mdgroup/total/total[tt]. If that is not the case, then you should",
- "set an environment variable [BB]GMX_TOTAL[bb] as in: [PAR]",
- "[TT]setenv GMX_TOTAL /usr/local/bin/total[tt][PAR]",
- "where the right hand side should point to the total executable.[PAR]",
- "Output is printed in files [TT]shift.out[tt] where t is the time of the frame.[PAR]",
- "The program also needs an input file called [BB]random.dat[bb] which",
- "contains the random coil chemical shifts of all protons."
- };
- static real dt=0.0;
- t_pargs pa[] = {
- { "-dt", FALSE, etREAL, { &dt }, "Time interval between frames." }
- };
- static char *bugs[] = {
- "The program is very slow"
- };
- static char *OXYGEN="O";
- FILE *out,*tot,*fp;
- t_topology *top;
- t_atoms *atoms;
- int status,nres;
- real t,nt;
- int i,natoms,nframe=0;
- matrix box;
- int gnx;
- char *grpnm,*randf;
- atom_id *index;
- rvec *x,*x_s;
- char pdbfile[32],tmpfile[32];
- char total[256],*dptr;
- t_filenm fnm[] = {
- { efTRX, "-f", NULL, ffREAD },
- { efTPX, NULL, NULL, ffREAD },
- { efNDX, NULL, NULL, ffREAD },
- { efOUT, "-o", "shift", ffWRITE },
- { efDAT, "-d", "random", ffREAD }
- };
- char *leg[] = { "shift","ring","anisCO","anisCN","sigmaE","sum" };
-#define NFILE asize(fnm)
-
- CopyRight(stdout,argv[0]);
- parse_common_args(&argc,argv,PCA_CAN_TIME,NFILE,fnm,
- asize(pa),pa,asize(desc),desc,asize(bugs),bugs);
-
- top=read_top(ftp2fn(efTPX,NFILE,fnm));
- atoms=&(top->atoms);
- nres=atoms->nres;
- for(i=0; (i<atoms->nr); i++)
- if ((strcmp(*atoms->atomname[i],"O1") == 0) ||
- (strcmp(*atoms->atomname[i],"O2") == 0) ||
- (strcmp(*atoms->atomname[i],"OXT") == 0) ||
- (strcmp(*atoms->atomname[i],"OT") == 0))
- atoms->atomname[i]=&OXYGEN;
- rd_index(ftp2fn(efNDX,NFILE,fnm),1,&gnx,&index,&grpnm);
-
- snew(x_s,atoms->nr);
-
- strcpy(pdbfile,"dsXXXXXX");
- gmx_tmpnam(pdbfile);
- strcpy(tmpfile,"dsXXXXXX");
- gmx_tmpnam(tmpfile);
- fprintf(stderr,"pdbfile = %s\ntmpfile = %s\n",pdbfile,tmpfile);
-
- if ((dptr=getenv("GMX_TOTAL")) == NULL)
- dptr="/home/mdgroup/total/total";
- sprintf(total,"%s > /dev/null",dptr);
- fprintf(stderr,"total cmd='%s'\n",total);
- randf=ftp2fn(efDAT,NFILE,fnm);
-
- natoms=read_first_x(&status,ftp2fn(efTRX,NFILE,fnm),&t,&x,box);
- if (natoms != atoms->nr)
- gmx_fatal(FARGS,"Trajectory does not match topology!");
- out=ftp2FILE(efOUT,NFILE,fnm,"w");
- xvgr_legend(out,asize(leg),leg);
- nt=t;
- do {
- if (t >= nt) {
- rm_pbc(&(top->idef),top->atoms.nr,box,x,x_s);
- fp=gmx_ffopen(pdbfile,"w");
- write_pdbfile_indexed(fp,"Generated by do_shift",
- atoms,x_s,box,0,-1,gnx,index);
- gmx_ffclose(fp);
-
- if ((tot=popen(total,"w")) == NULL)
- perror("opening pipe to total");
- fprintf(tot,"%s\n",pdbfile);
- fprintf(tot,"%s\n",tmpfile);
- fprintf(tot,"3\n");
- fprintf(tot,"N\n");
- fprintf(tot,"%s\n",randf);
- fprintf(tot,"N\n");
- fprintf(tot,"N\n");
- if (pclose(tot) != 0)
- perror("closing pipe to total");
- cat(out,tmpfile,t);
- remove(pdbfile);
- remove(tmpfile);
- nt+=dt;
- nframe++;
- }
- } while(read_next_x(status,&t,natoms,x,box));
- close_trx(status);
- gmx_ffclose(out);
-
- gmx_thanx(stderr);
-
- return 0;
-}
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.3.3
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2008, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Groningen Machine for Chemical Simulation
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-#include "typedefs.h"
-#include "gromacs/utility/smalloc.h"
-#include "macros.h"
-#include "gromacs/utility/fatalerror.h"
-#include "random.h"
-#include "gromacs/fileio/pdbio.h"
-#include "gromacs/utility/futil.h"
-#include "gromacs/math/units.h"
-#include "gromacs/fileio/xvgr.h"
-#include "gromacs/math/vec.h"
-#include "names.h"
-#include "ehdata.h"
-#include "gromacs/fileio/pdbio.h"
-
-t_histo *init_histo(int np,real minx,real maxx)
-{
- t_histo *h;
-
- snew(h,1);
- snew(h->y,np+1);
- snew(h->nh,np+1);
- h->np = np;
- if (maxx <= minx)
- gmx_fatal(FARGS,"minx (%f) should be less than maxx (%f) in init_histo",minx,maxx);
- h->minx = minx;
- h->maxx = maxx;
- h->dx_1 = np/(maxx-minx);
- h->dx = (maxx-minx)/np;
-
- return h;
-}
-
-void done_histo(t_histo *h)
-{
- sfree(h->y);
- sfree(h->nh);
- h->np = 0;
-}
-
-void add_histo(t_histo *h,real x,real y)
-{
- int n;
-
- n = (x-h->minx)*h->dx_1;
- if ((n < 0) || (n > h->np))
- gmx_fatal(FARGS,"Invalid x (%f) in add_histo. Should be in %f - %f",x,h->minx,h->maxx);
- h->y[n] += y;
- h->nh[n]++;
-}
-
-void dump_histo(t_histo *h,char *fn,char *title,char *xaxis,char *yaxis,
- int enorm,real norm_fac)
-{
- FILE *fp;
- int i,nn;
-
- for(nn=h->np; (nn > 0); nn--)
- if (h->nh[nn] != 0)
- break;
- for(i=0; (i<nn); i++)
- if (h->nh[i] > 0)
- break;
- fp = xvgropen(fn,title,xaxis,yaxis);
- for( ; (i<nn); i++) {
- switch (enorm) {
- case enormNO:
- fprintf(fp,"%12f %12f %d\n",h->minx+h->dx*i,h->y[i],h->nh[i]);
- break;
- case enormFAC:
- fprintf(fp,"%12f %12f %d\n",h->minx+h->dx*i,h->y[i]*norm_fac,h->nh[i]);
- break;
- case enormNP:
- if (h->nh[i] > 0)
- fprintf(fp,"%12f %12f %d\n",
- h->minx+h->dx*i,h->y[i]*norm_fac/h->nh[i],h->nh[i]);
- break;
- default:
- gmx_fatal(FARGS,"Wrong value for enorm (%d)",enorm);
- }
- }
- gmx_ffclose(fp);
-}
-
-/*******************************************************************
- *
- * Functions to analyse and monitor scattering
- *
- *******************************************************************/
-
-void add_scatter_event(t_ana_scat *scatter,rvec pos,gmx_bool bInel,
- real t,real ekin)
-{
- int np = scatter->np;
-
- if (np == scatter->maxp) {
- scatter->maxp += 32;
- srenew(scatter->time,scatter->maxp);
- srenew(scatter->ekin,scatter->maxp);
- srenew(scatter->bInel,scatter->maxp);
- srenew(scatter->pos,scatter->maxp);
- }
- scatter->time[np] = t;
- scatter->bInel[np] = np;
- scatter->ekin[np] = ekin;
- copy_rvec(pos,scatter->pos[np]);
- scatter->np++;
-}
-
-void reset_ana_scat(t_ana_scat *scatter)
-{
- scatter->np = 0;
-}
-
-void done_scatter(t_ana_scat *scatter)
-{
- scatter->np = 0;
- sfree(scatter->time);
- sfree(scatter->ekin);
- sfree(scatter->bInel);
- sfree(scatter->pos);
-}
-
-void analyse_scatter(t_ana_scat *scatter,t_histo *hmfp)
-{
- int i,n;
- rvec dx;
-
- if (scatter->np > 1) {
- for(i=1; (i<scatter->np); i++) {
- rvec_sub(scatter->pos[i],scatter->pos[i-1],dx);
- add_histo(hmfp,scatter->ekin[i],norm(dx));
- }
- }
-}
-
-/*******************************************************************
- *
- * Functions to analyse structural changes
- *
- *******************************************************************/
-
-t_ana_struct *init_ana_struct(int nstep,int nsave,real timestep,
- int maxparticle)
-{
- t_ana_struct *anal;
-
- snew(anal,1);
- anal->nanal = 1.2*((nstep / nsave)+1);
- anal->index = 0;
- anal->dt = nsave*timestep;
- snew(anal->t,anal->nanal);
- snew(anal->maxdist,anal->nanal);
- snew(anal->d2_com,anal->nanal);
- snew(anal->d2_origin,anal->nanal);
- snew(anal->nion,anal->nanal);
- anal->nstruct = 1;
- anal->nparticle = 1;
- anal->maxparticle = maxparticle;
- snew(anal->q,1);
- snew(anal->x,1);
- snew(anal->x[0],maxparticle);
-
- return anal;
-}
-
-void done_ana_struct(t_ana_struct *anal)
-{
- int i;
-
- sfree(anal->t);
- sfree(anal->maxdist);
- sfree(anal->d2_com);
- sfree(anal->d2_origin);
- sfree(anal->nion);
- sfree(anal->q);
- for(i=0; (i<anal->nstruct); i++)
- sfree(anal->x[i]);
- sfree(anal->x);
-}
-
-void reset_ana_struct(t_ana_struct *anal)
-{
- int i;
-
- for(i=0; (i<anal->nanal); i++) {
- anal->t[i] = 0;
- anal->maxdist[i] = 0;
- clear_rvec(anal->d2_com[i]);
- clear_rvec(anal->d2_origin[i]);
- anal->nion[i] = 0;
- }
- anal->index = 0;
-}
-
-void add_ana_struct(t_ana_struct *total,t_ana_struct *add)
-{
- int i,m;
-
- if (total->index == 0)
- total->index = add->index;
- else if (total->index != add->index)
- gmx_fatal(FARGS,"Analysis incompatible (total: %d, add: %d) %s, %d",
- total->index,add->index,__FILE__,__LINE__);
- for(i=0; (i<total->index); i++) {
- if (total->t[i] == 0)
- total->t[i] = add->t[i];
- else if (total->t[i] != add->t[i])
- gmx_fatal(FARGS,"Inconsistent times in analysis (%f-%f) %s, %d",
- total->t[i],add->t[i],__FILE__,__LINE__);
- if (add->maxdist[i] > total->maxdist[i])
- total->maxdist[i] = add->maxdist[i];
- for(m=0; (m<DIM); m++) {
- total->d2_com[i][m] += add->d2_com[i][m]/add->nion[i];
- total->d2_origin[i][m] += add->d2_origin[i][m]/add->nion[i];
- }
- total->nion[i] += add->nion[i];
- }
-}
-
-static void do_add_struct(t_ana_struct *anal,int nparticle,rvec x[])
-{
- int i,j;
-
- if (nparticle > anal->nparticle) {
- for(i=0; (i<anal->nstruct); i++) {
- for(j=anal->nparticle; (j<nparticle); j++)
- copy_rvec(x[j],anal->x[i][j]);
- }
- }
- anal->nparticle=nparticle;
- srenew(anal->x,anal->nstruct+1);
- snew(anal->x[anal->nstruct],anal->maxparticle);
- for(j=0; (j<nparticle); j++)
- copy_rvec(x[j],anal->x[anal->nstruct][j]);
- anal->nstruct++;
-}
-
-void analyse_structure(t_ana_struct *anal,real t,rvec center,
- rvec x[],int nparticle,real charge[])
-{
- int i,j,m,nel,n=0;
- rvec dx,com;
- real dx2,dx1;
-
- j = anal->index;
- if (j >= anal->nanal)
- gmx_fatal(FARGS,"Too many points in analyse_structure");
- anal->t[j] = t;
- anal->maxdist[j] = 0;
- clear_rvec(com);
- nel = 0;
- for(i=0; (i<nparticle); i++) {
- if (charge[i] < 0) {
- rvec_inc(com,x[i]);
- nel++;
- }
- }
- if (nel > 0)
- for(m=0; (m<3); m++)
- com[m] /= nel;
- for(i=0; (i<nparticle); i++) {
- if (charge[i] < 0) {
- rvec_sub(x[i],com,dx);
- for(m=0; (m<DIM); m++) {
- anal->d2_com[j][m] += sqr(dx[m]);
- anal->d2_origin[j][m] += sqr(x[i][m]);
- }
- dx2 = iprod(x[i],x[i]);
- dx1 = sqrt(dx2);
- if (dx1 > anal->maxdist[j])
- anal->maxdist[j] = dx1;
- n++;
- }
- }
- do_add_struct(anal,nparticle,x);
- anal->nion[j] = n;
- anal->index++;
-}
-
-void dump_ana_struct(char *rmax,char *nion,char *gyr_com,char *gyr_origin,
- t_ana_struct *anal,int nsim)
-{
- FILE *fp,*gp,*hp,*kp;
- int i,j;
- real t,d2;
- char *legend[] = { "Rg", "RgX", "RgY", "RgZ" };
-
- fp = xvgropen(rmax,"rmax","Time (fs)","r (nm)");
- gp = xvgropen(nion,"N ion","Time (fs)","N ions");
- hp = xvgropen(gyr_com,"Radius of gyration wrt. C.O.M.",
- "Time (fs)","Rg (nm)");
- xvgr_legend(hp,asize(legend),legend);
- kp = xvgropen(gyr_origin,"Radius of gyration wrt. Origin",
- "Time (fs)","Rg (nm)");
- xvgr_legend(kp,asize(legend),legend);
- for(i=0; (i<anal->index); i++) {
- t = 1000*anal->t[i];
- fprintf(fp,"%12g %10.3f\n",t,anal->maxdist[i]);
- fprintf(gp,"%12g %10.3f\n",t,(1.0*anal->nion[i])/nsim-1);
- d2 = anal->d2_com[i][XX] + anal->d2_com[i][YY] + anal->d2_com[i][ZZ];
- fprintf(hp,"%12g %10.3f %10.3f %10.3f %10.3f\n",
- t,sqrt(d2/nsim),
- sqrt(anal->d2_com[i][XX]/nsim),
- sqrt(anal->d2_com[i][YY]/nsim),
- sqrt(anal->d2_com[i][ZZ]/nsim));
- d2 = anal->d2_origin[i][XX] + anal->d2_origin[i][YY] + anal->d2_origin[i][ZZ];
- fprintf(kp,"%12g %10.3f %10.3f %10.3f %10.3f\n",
- t,sqrt(d2/nsim),
- sqrt(anal->d2_origin[i][XX]/nsim),
- sqrt(anal->d2_origin[i][YY]/nsim),
- sqrt(anal->d2_origin[i][ZZ]/nsim));
- }
- gmx_ffclose(hp);
- gmx_ffclose(gp);
- gmx_ffclose(fp);
- gmx_ffclose(kp);
-}
-
-void dump_as_pdb(char *pdb,t_ana_struct *anal)
-{
- FILE *kp;
- int i,j;
- real t;
-
- kp = gmx_ffopen(pdb,"w");
- for(i=0; (i<anal->nstruct); i++) {
- t = 1000*anal->t[i];
- fprintf(kp,"MODEL %d time %g fs\n",i+1,t);
- for(j=0; (j<anal->nparticle); j++) {
- fprintf(kp,get_pdbformat(),"ATOM",i+1,(j < anal->nion[i]) ? "O" : "N",
- "PLS",' ',1,
- anal->x[i][j][XX]/100,
- anal->x[i][j][YY]/100,
- anal->x[i][j][ZZ]/100);
- fprintf(kp,"\n");
- }
- fprintf(kp,"ENDMDL\n");
- }
- gmx_ffclose(kp);
-}
-
-char *enms[eNR] = {
- "Coulomb", "Repulsion", "Potential",
- "EkHole", "EkElectron", "EkLattice", "Kinetic",
- "Total"
-};
-
-void add_ana_ener(t_ana_ener *ae,int nn,real e[])
-{
- int i;
-
- /* First time around we are constantly increasing the array size */
- if (nn >= ae->nx) {
- if (ae->nx == ae->maxx) {
- ae->maxx += 1024;
- srenew(ae->e,ae->maxx);
- }
- for(i=0; (i<eNR); i++)
- ae->e[ae->nx][i] = e[i];
- ae->nx++;
- }
- else {
- for(i=0; (i<eNR); i++)
- ae->e[nn][i] += e[i];
- }
-}
-
-void dump_ana_ener(t_ana_ener *ae,int nsim,real dt,char *edump,
- t_ana_struct *total)
-{
- FILE *fp;
- int i,j;
- real fac;
-
- fac = 1.0/(nsim*ELECTRONVOLT);
- fp=xvgropen(edump,"Energies","Time (fs)","E (eV)");
- xvgr_legend(fp,eNR,enms);
- fprintf(fp,"@ s%d legend \"Ek/Nelec\"\n",eNR);
- fprintf(fp,"@ type nxy\n");
- for(i=0; (i<ae->nx); i++) {
- fprintf(fp,"%10f",1000.0*dt*i);
- for(j=0; (j<eNR); j++)
- fprintf(fp," %8.3f",ae->e[i][j]*fac);
- fprintf(fp," %8.3f\n",ae->e[i][eELECTRON]/(ELECTRONVOLT*total->nion[i]));
- }
- fprintf(fp,"&\n");
- gmx_ffclose(fp);
-}
-
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.3.3
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2008, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Groningen Machine for Chemical Simulation
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <math.h>
-#include "typedefs.h"
-#include "gromacs/utility/smalloc.h"
-#include "macros.h"
-#include "gromacs/utility/fatalerror.h"
-#include "random.h"
-#include "gromacs/utility/strdb.h"
-#include "gromacs/utility/futil.h"
-#include "ehdata.h"
-
-typedef struct {
- int nener,nomega,nq; /* Number of entries in the table */
- real *ener; /* Energy values */
- real **omega; /* Omega values (energy dependent) */
- real ***prob,***q; /* Probability and Q */
-} t_pq_inel;
-
-typedef struct {
- int nener,n2Ddata; /* Number of entries in the table */
- real *ener; /* Energy values */
- real **prob,**data; /* Probability and data (energy loss) */
-} t_p2Ddata;
-
-static int realcomp(const void *a,const void *b)
-{
- real *ra,*rb;
-
- ra = (real *)a;
- rb = (real *)b;
- if (ra < rb)
- return -1;
- else if (ra > rb)
- return 1;
- else
- return 0;
-}
-
-static t_p2Ddata *read_p2Ddata(char *fn)
-{
- FILE *fp;
- t_p2Ddata *p2Ddata;
- int i,j;
- double e,p,o;
-
- fprintf(stdout,"Going to read %s\n",fn);
- fp = gmx_ffopen(fn,"r");
-
- /* Allocate memory and set constants */
- snew(p2Ddata,1);
- if (fscanf(fp,"%d%d",&p2Ddata->nener,&p2Ddata->n2Ddata) != 2)
- gmx_fatal(FARGS,"I need two integers: nener, n in file %s",fn);
-
- snew(p2Ddata->ener,p2Ddata->nener);
- snew(p2Ddata->prob,p2Ddata->nener);
- snew(p2Ddata->data,p2Ddata->nener);
-
- /* Double loop to read data */
- for(i=0; (i<p2Ddata->nener); i++) {
- fprintf(stderr,"\rEnergy %d/%d",i+1,p2Ddata->nener);
- snew(p2Ddata->prob[i],p2Ddata->n2Ddata);
- snew(p2Ddata->data[i],p2Ddata->n2Ddata);
-
- for(j=0; (j<p2Ddata->n2Ddata); j++) {
- fscanf(fp,"%lf%lf%lf",&e,&p,&o);
-
- /* Consistency check */
- if (j==0)
- p2Ddata->ener[i] = e;
- else if (fabs(p2Ddata->ener[i]-e) > 1e-6*e)
- gmx_fatal(FARGS,"Inconsistent energy %f i=%d j=%d",e,i,j);
- p2Ddata->prob[i][j] = p;
- p2Ddata->data[i][j] = o;
- }
- /* There is some noise on the data, take it away by sorting,
- * because otherwise binary search does not work.
- * This is equivalent to shifting in the data slightly along the X-axis
- * but better than linear search with the "real" data.
- */
- qsort(p2Ddata->data[i],p2Ddata->n2Ddata,sizeof(p2Ddata->data[0][0]),
- realcomp);
- }
- fprintf(stderr,"\n");
-
- gmx_ffclose(fp);
-
- return p2Ddata;
-}
-
-static t_pq_inel *read_pq(char *fn)
-{
- FILE *fp;
- t_pq_inel *pq;
- int i,j,k;
- double e,p,o,t;
-
- fprintf(stdout,"Going to read %s\n",fn);
- fp = gmx_ffopen(fn,"r");
-
- /* Allocate memory and set constants */
- snew(pq,1);
- if (fscanf(fp,"%d%d%d",&pq->nener,&pq->nomega,&pq->nq) != 3)
- gmx_fatal(FARGS,"I need three integers: nener, nomega, nq in file %s",fn);
-
- snew(pq->ener,pq->nener);
- snew(pq->omega,pq->nener);
- snew(pq->prob,pq->nener);
- snew(pq->q,pq->nener);
-
- /* Triple loop to read data */
- for(i=0; (i<pq->nener); i++) {
- fprintf(stderr,"\rEnergy %d/%d",i+1,pq->nener);
- snew(pq->prob[i],pq->nomega);
- snew(pq->q[i],pq->nomega);
- snew(pq->omega[i],pq->nomega);
-
- for(j=0; (j<pq->nomega); j++) {
- snew(pq->prob[i][j],pq->nq);
- snew(pq->q[i][j],pq->nq);
-
- for(k=0; (k<pq->nq); k++) {
- fscanf(fp,"%lf%lf%lf%lf",&e,&o,&p,&t);
-
- /* Consistency check */
- if ((j == 0) && (k == 0))
- pq->ener[i] = e;
- else if (fabs(pq->ener[i]-e) > 1e-6*e)
- gmx_fatal(FARGS,"Inconsistent energy %f i=%d j=%d k=%d",e,i,j,k);
-
- if (k == 0)
- pq->omega[i][j] = o;
- else if (fabs(pq->omega[i][j]-o) > 1e-6*o)
- gmx_fatal(FARGS,"Inconsistent omega %f i=%d j=%d k=%d",o,i,j,k);
-
- pq->prob[i][j][k] = p;
- pq->q[i][j][k] = t;
- }
- }
- }
- fprintf(stderr,"\n");
-
- gmx_ffclose(fp);
-
- return pq;
-}
-
-static int my_bsearch(real val,int ndata,real data[],gmx_bool bLower)
-{
- int ilo,ihi,imed;
-
- if (val < data[0])
- return -1;
- ilo = 0;
- ihi = ndata-1;
- while ((ihi - ilo) > 1) {
- imed = (ilo+ihi)/2;
- if (data[imed] > val)
- ihi = imed;
- else
- ilo = imed;
- }
- /* Now val should be in between data[ilo] and data[ihi] */
- /* Decide which one is closest */
- if (bLower || ((val-data[ilo]) <= (data[ihi]-val)))
- return ilo;
- else
- return ihi;
-}
-
-static real interpolate2D(int nx,int ny,real *dx,real **data,
- real x0,real fy,int nx0,int ny0)
-{
- real fx;
-
- fx = (x0-dx[nx0])/(dx[nx0+1]-dx[nx0]);
-
- return (fx*fy*data[nx0][ny0] + fx*(1-fy)*data[nx0][ny0+1] +
- (1-fx)*fy*data[nx0+1][ny0] + (1-fx)*(1-fy)*data[nx0+1][ny0+1]);
-}
-
-real get_omega(real ekin,int *seed,FILE *fp,char *fn)
-{
- static t_p2Ddata *p2Ddata = NULL;
- real r,ome,fx,fy;
- int eindex,oindex;
-
- if (p2Ddata == NULL)
- p2Ddata = read_p2Ddata(fn);
-
- /* Get energy index by binary search */
- if ((eindex = my_bsearch(ekin,p2Ddata->nener,p2Ddata->ener,TRUE)) >= 0) {
-#ifdef DEBUG
- if (eindex >= p2Ddata->nener)
- gmx_fatal(FARGS,"eindex (%d) out of range (max %d) in get_omega",
- eindex,p2Ddata->nener);
-#endif
-
- /* Start with random number */
- r = rando(seed);
-
- /* Do binary search in the energy table */
- if ((oindex = my_bsearch(r,p2Ddata->n2Ddata,p2Ddata->prob[eindex],TRUE)) >= 0) {
-#ifdef DEBUG
- if (oindex >= p2Ddata->n2Ddata)
- gmx_fatal(FARGS,"oindex (%d) out of range (max %d) in get_omega",
- oindex,p2Ddata->n2Ddata);
-#endif
-
- fy = ((r-p2Ddata->prob[eindex][oindex])/
- (p2Ddata->prob[eindex][oindex+1]-p2Ddata->prob[eindex][oindex]));
- ome = interpolate2D(p2Ddata->nener,p2Ddata->n2Ddata,p2Ddata->ener,
- p2Ddata->data,ekin,fy,
- eindex,oindex);
- /* ome = p2Ddata->data[eindex][oindex];*/
-
- if (fp)
- fprintf(fp,"%8.3f %8.3f\n",ome,r);
-
- return ome;
- }
- }
- return 0;
-}
-
-real get_theta_el(real ekin,int *seed,FILE *fp,char *fn)
-{
- static t_p2Ddata *p2Ddata = NULL;
- real r,theta;
- int eindex,tindex;
-
- if (p2Ddata == NULL)
- p2Ddata = read_p2Ddata(fn);
-
- /* Get energy index by binary search */
- if ((eindex = my_bsearch(ekin,p2Ddata->nener,p2Ddata->ener,TRUE)) >= 0) {
-
- /* Start with random number */
- r = rando(seed);
-
- /* Do binary search in the energy table */
- if ((tindex = my_bsearch(r,p2Ddata->n2Ddata,p2Ddata->prob[eindex],FALSE)) >= 0) {
-
- theta = p2Ddata->data[eindex][tindex];
-
- if (fp)
- fprintf(fp,"%8.3f %8.3f\n",theta,r);
-
- return theta;
- }
- }
- return 0;
-}
-
-real get_q_inel(real ekin,real omega,int *seed,FILE *fp,char *fn)
-{
- static t_pq_inel *pq = NULL;
- int eindex,oindex,tindex;
- real r,theta;
-
- if (pq == NULL)
- pq = read_pq(fn);
-
- /* Get energy index by binary search */
- if ((eindex = my_bsearch(ekin,pq->nener,pq->ener,TRUE)) >= 0) {
-#ifdef DEBUG
- if (eindex >= pq->nener)
- gmx_fatal(FARGS,"eindex out of range (%d >= %d)",eindex,pq->nener);
-#endif
-
- /* Do binary search in the energy table */
- if ((oindex = my_bsearch(omega,pq->nomega,pq->omega[eindex],FALSE)) >= 0) {
-#ifdef DEBUG
- if (oindex >= pq->nomega)
- gmx_fatal(FARGS,"oindex out of range (%d >= %d)",oindex,pq->nomega);
-#endif
-
- /* Start with random number */
- r = rando(seed);
-
- if ((tindex = my_bsearch(r,pq->nq,pq->prob[eindex][oindex],FALSE)) >= 0) {
-#ifdef DEBUG
- if (tindex >= pq->nq)
- gmx_fatal(FARGS,"tindex out of range (%d >= %d)",tindex,pq->nq);
-#endif
-
- theta = pq->q[eindex][oindex][tindex];
-
- if (fp)
- fprintf(fp,"get_q_inel: %8.3f %8.3f\n",theta,r);
-
- return theta;
- }
- }
- }
- return 0;
-}
-
-static int read_cross(char *fn,real **ener,real **cross,real factor)
-{
- char **data=NULL;
- double e,c;
- int i,j,n;
-
- fprintf(stdout,"Going to read %s\n",fn);
- n = get_file(fn,&data);
-
- /* Allocate memory */
- snew(*cross,n);
- snew(*ener,n);
- for(i=j=0; (i<n); i++) {
- if (sscanf(data[i],"%lf%lf",&e,&c) == 2) {
- (*ener)[j] = e;
- (*cross)[j] = c*factor;
- j++;
- }
- sfree(data[i]);
- }
- sfree(data);
- if (j != n)
- fprintf(stderr,"There were %d empty lines in file %s\n",n-j,fn);
-
- return j;
-}
-
-real cross_inel(real ekin,real rho,char *fn)
-{
- static real *ener = NULL;
- static real *cross = NULL;
- static int ninel;
- int eindex;
-
- /* Read data at first call, convert A^2 to nm^2 */
- if (cross == NULL)
- ninel = read_cross(fn,&ener,&cross,rho*0.01);
-
- /* Compute index with binary search */
- if ((eindex = my_bsearch(ekin,ninel,ener,FALSE)) >= 0) {
-#ifdef DEBUG
- if (eindex >= ninel)
- gmx_fatal(FARGS,"ekin = %f, ener[0] = %f, ener[%d] = %f",ekin,
- ener[0],ener[ninel-1]);
-#endif
- return cross[eindex];
- }
-
- return 0;
-}
-
-real cross_el(real ekin,real rho,char *fn)
-{
- static real *ener = NULL;
- static real *cross = NULL;
- static int nel;
- int eindex;
-
- /* Read data at first call, convert A^2 to nm^2 */
- if (cross == NULL)
- nel = read_cross(fn,&ener,&cross,rho*0.01);
-
- /* Compute index with binary search */
- if ((eindex = my_bsearch(ekin,nel,ener,FALSE)) >= 0) {
-#ifdef DEBUG
- if (eindex >= nel)
- gmx_fatal(FARGS,"ekin = %f, ener[0] = %f, ener[%d] = %f",ekin,
- ener[0],ener[nel-1]);
-#endif
-
- return cross[eindex];
- }
- return 0;
-}
-
-real band_ener(int *seed,FILE *fp,char *fn)
-{
- static real *ener = NULL;
- static real *prob = NULL;
- static int nener;
- int eindex;
- real r;
-
- /* Read data at first call, misuse read_cross function */
- if (prob == NULL)
- nener = read_cross(fn,&ener,&prob,1.0);
-
- r = rando(seed);
-
- if ((eindex = my_bsearch(r,nener,prob,FALSE)) >= 0) {
-#ifdef DEBUG
- if (eindex >= nener)
- gmx_fatal(FARGS,"r = %f, prob[0] = %f, prob[%d] = %f",r,
- prob[0],prob[nener-1]);
-#endif
-
- if (fp)
- fprintf(fp,"%8.3f %8.3f\n",ener[eindex],r);
-
- return ener[eindex];
- }
- return 0;
-}
-
-static void test_omega(FILE *fp,int *seed)
-{
- int i;
-
- fprintf(fp,"Testing the energy loss tables\n");
- for(i=0; (i<1000); i++) {
- (void) get_omega(500*rando(seed),seed,fp,NULL);
- }
-}
-
-static void test_q_inel(FILE *fp,int *seed)
-{
- int i;
-
- fprintf(fp,"Testing the energy/omega dependent inelastic scattering q tables\n");
- for(i=0; (i<1000); i++) {
- (void) get_q_inel(500*rando(seed),400*rando(seed),seed,fp,NULL);
- }
-}
-
-static void test_theta_el(FILE *fp,int *seed)
-{
- int i;
-
- fprintf(fp,"Testing the energy dependent elastic scattering theta tables\n");
- for(i=0; (i<1000); i++) {
- (void) get_theta_el(500*rando(seed),seed,fp,NULL);
- }
-}
-
-static void test_sigma_el(FILE *fp,real rho)
-{
- int i;
-
- fprintf(fp,"Testing the elastic cross sections table\n");
- for(i=0; (i<500); i++) {
- fprintf(fp,"%3d %8.3f\n",i,cross_el(i,rho,NULL));
- }
-}
-
-static void test_sigma_inel(FILE *fp,real rho)
-{
- int i;
-
- fprintf(fp,"Testing the inelastic cross sections table\n");
- for(i=0; (i<500); i++) {
- fprintf(fp,"%3d %8.3f\n",i,cross_inel(i,rho,NULL));
- }
-}
-
-static void test_band_ener(int *seed,FILE *fp)
-{
- int i;
-
- for(i=0; (i<500); i++) {
- band_ener(seed,fp,NULL);
- }
-}
-
-void init_tables(int nfile,t_filenm fnm[],real rho)
-{
- int seed = 1993;
- real ekin = 20;
- real omega = 10;
-
- (void) band_ener(&seed,NULL,opt2fn("-band",nfile,fnm));
- (void) cross_el(ekin,rho,opt2fn("-sigel",nfile,fnm));
- (void) cross_inel(ekin,rho,opt2fn("-sigin",nfile,fnm));
- (void) get_theta_el(ekin,&seed,NULL,opt2fn("-thetael",nfile,fnm));
- (void) get_omega(ekin,&seed,NULL,opt2fn("-eloss",nfile,fnm));
- (void) get_q_inel(ekin,omega,&seed,NULL,opt2fn("-qtrans",nfile,fnm));
-}
-
-void test_tables(int *seed,char *fn,real rho)
-{
- FILE *fp;
-
- fp = fopen(fn,"w");
-
- test_omega(fp,seed);
- test_q_inel(fp,seed);
- test_theta_el(fp,seed);
- test_sigma_el(fp,rho);
- test_sigma_inel(fp,rho);
- test_band_ener(seed,fp);
-
- fclose(fp);
-}
-
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Good gRace! Old Maple Actually Chews Slate
- */
-
-extern real get_omega(real ekin,int *seed,FILE *fp,char *fn);
-
-extern real get_q_inel(real ekin,real omega,int *seed,FILE *fp,char *fn);
-
-extern real get_theta_el(real ekin,int *seed,FILE *fp,char *fn);
-
-extern real cross_inel(real ekin,real rho,char *fn);
-
-extern real cross_el(real ekin,real rho,char *fn);
-
-extern real band_ener(int *seed,FILE *fp,char *fn);
-
-extern void init_tables(int nfile,t_filenm fnm[], real rho);
-/* Must be called before any of the table lookup thingies */
-
-extern void test_tables(int *seed,char *fn,real rho);
-
-/*******************************************************************
- *
- * Functions to make histograms
- *
- *******************************************************************/
-
-enum { enormNO, enormFAC, enormNP, enormNR };
-
-typedef struct {
- int np;
- real minx,maxx,dx,dx_1;
- real *y;
- int *nh;
-} t_histo;
-
-extern t_histo *init_histo(int np,real minx,real maxx);
-
-extern void done_histo(t_histo *h);
-
-extern void add_histo(t_histo *h,real x,real y);
-
-extern void dump_histo(t_histo *h,char *fn,char *title,char *xaxis,char *yaxis,
- int enorm,real norm_fac);
-
-
-/*******************************************************************
- *
- * Functions to analyse and monitor scattering
- *
- *******************************************************************/
-
-typedef struct {
- int np,maxp;
- real *time;
- real *ekin;
- gmx_bool *bInel;
- rvec *pos;
-} t_ana_scat;
-
-extern void add_scatter_event(t_ana_scat *scatter,rvec pos,gmx_bool bInel,
- real t,real ekin);
-
-extern void reset_ana_scat(t_ana_scat *scatter);
-
-extern void done_scatter(t_ana_scat *scatter);
-
-extern void analyse_scatter(t_ana_scat *scatter,t_histo *hmfp);
-
-/*******************************************************************
- *
- * Functions to analyse structural changes
- *
- *******************************************************************/
-
-typedef struct {
- int nanal,index;
- real dt;
- real *t;
- real *maxdist;
- rvec *d2_com,*d2_origin;
- int *nion;
- int nstruct,nparticle,maxparticle;
- rvec *q;
- rvec **x;
-} t_ana_struct;
-
-extern t_ana_struct *init_ana_struct(int nstep,int nsave,real timestep,
- int maxparticle);
-
-extern void done_ana_struct(t_ana_struct *anal);
-
-extern void reset_ana_struct(t_ana_struct *anal);
-
-extern void add_ana_struct(t_ana_struct *total,t_ana_struct *add);
-
-extern void analyse_structure(t_ana_struct *anal,real t,rvec center,
- rvec x[],int nparticle,real charge[]);
-
-extern void dump_ana_struct(char *rmax,char *nion,char *gyr_com,
- char *gyr_origin,t_ana_struct *anal,int nsim);
-
-extern void dump_as_pdb(char *pdb,t_ana_struct *anal);
-
-/*******************************************************************
- *
- * Functions to analyse energies
- *
- *******************************************************************/
-
-enum { eCOUL, eREPULS, ePOT, eHOLE, eELECTRON, eLATTICE, eKIN, eTOT, eNR };
-extern char *enms[eNR];
-
-typedef real evec[eNR];
-
-typedef struct {
- int nx,maxx;
- evec *e;
-} t_ana_ener;
-
-extern void add_ana_ener(t_ana_ener *ae,int nn,real e[]);
-
-extern void dump_ana_ener(t_ana_ener *ae,int nsim,real dt,char *edump,
- t_ana_struct *total);
-
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.3.3
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2008, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Groningen Machine for Chemical Simulation
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-#include "typedefs.h"
-#include "gromacs/utility/smalloc.h"
-#include "macros.h"
-#include "copyrite.h"
-#include "gromacs/commandline/pargs.h"
-#include "gromacs/utility/fatalerror.h"
-#include "random.h"
-#include "gromacs/fileio/pdbio.h"
-#include "gromacs/utility/futil.h"
-#include "gromacs/math/units.h"
-#include "gromacs/math/vec.h"
-#include "names.h"
-#include "ehdata.h"
-
-typedef struct {
- int maxparticle;
- int maxstep;
- int nsim;
- int nsave;
- int nana;
- int seed;
- int nevent;
- gmx_bool bForce;
- gmx_bool bScatter;
- gmx_bool bHole;
- real dt;
- real deltax;
- real epsr;
- real Alj;
- real Eauger;
- real Efermi;
- real Eband;
- real rho;
- real matom;
- real evdist;
- real size;
-} t_eh_params;
-
-#define ELECTRONMASS 5.447e-4
-/* Resting mass of electron in a.m.u. */
-#define HOLEMASS (0.8*ELECTRONMASS)
-/* Effective mass of a hole! */
-#define HBAR (PLANCK/2*M_PI)
-
-static void calc_forces(int n,rvec x[],rvec f[],real q[],real ener[],real Alj)
-{
- const real facel = FACEL;
- int i,j,m;
- rvec dx;
- real qi,r2,r_1,r_2,fscal,df,vc,vctot,vlj,vljtot;
-
- for(i=0; (i<n); i++)
- clear_rvec(f[i]);
-
- vctot = vljtot = 0;
- for(i=0; (i<n-1); i++) {
- qi = q[i]*facel;
- for(j=i+1; (j<n); j++) {
- rvec_sub(x[i],x[j],dx);
- r2 = iprod(dx,dx);
- r_1 = 1.0/sqrt(r2);
- r_2 = r_1*r_1;
- vc = qi*q[j]*r_1;
- vctot += vc;
- vlj = Alj*(r_2*r_2*r_2);
- vljtot += vlj;
- fscal = (6*vlj+vc)*r_2;
- for(m=0; (m<DIM); m++) {
- df = fscal*dx[m];
- f[i][m] += df;
- f[j][m] -= df;
- }
- }
- }
- ener[eCOUL] = vctot;
- ener[eREPULS] = vljtot;
- ener[ePOT] = vctot+vljtot;
-}
-
-static void calc_ekin(int nparticle,rvec v[],rvec vold[],
- real q[],real m[],real ener[],real eparticle[])
-{
- rvec vt;
- real ekh=0,eke=0,ee;
- int i;
-
- for(i=0; (i<nparticle); i++) {
- rvec_add(v[i],vold[i],vt);
- ee = 0.125*m[i]*iprod(vt,vt);
- eparticle[i] = ee/ELECTRONVOLT;
- if (q[i] > 0)
- ekh += ee;
- else
- eke += ee;
- }
- ener[eHOLE] = ekh;
- ener[eELECTRON] = eke;
- ener[eKIN] = ekh+eke+ener[eLATTICE];
-}
-
-static void polar2cart(real amp,real phi,real theta,rvec v)
-{
- real ss = sin(theta);
-
- v[XX] = amp*cos(phi)*ss;
- v[YY] = amp*sin(phi)*ss;
- v[ZZ] = amp*cos(theta);
-}
-
-static void rand_vector(real amp,rvec v,int *seed)
-{
- real theta,phi;
-
- theta = M_PI*rando(seed);
- phi = 2*M_PI*rando(seed);
- polar2cart(amp,phi,theta,v);
-}
-
-static void rotate_theta(rvec v,real nv,real dth,int *seed,FILE *fp)
-{
- real dphi,theta0,phi0,cc,ss;
- matrix mphi,mtheta,mphi_1,mtheta_1;
- rvec vp,vq,vold;
-
- copy_rvec(v,vold);
- theta0 = acos(v[ZZ]/nv);
- phi0 = atan2(v[YY],v[XX]);
- if (fp)
- fprintf(fp,"Theta = %g Phi = %g\n",theta0,phi0);
-
- clear_mat(mphi);
- cc = cos(-phi0);
- ss = sin(-phi0);
- mphi[XX][XX] = mphi[YY][YY] = cc;
- mphi[XX][YY] = -ss;
- mphi[YY][XX] = ss;
- mphi[ZZ][ZZ] = 1;
- m_inv(mphi,mphi_1);
-
- clear_mat(mtheta);
- cc = cos(-theta0);
- ss = sin(-theta0);
- mtheta[XX][XX] = mtheta[ZZ][ZZ] = cc;
- mtheta[XX][ZZ] = ss;
- mtheta[ZZ][XX] = -ss;
- mtheta[YY][YY] = 1;
- m_inv(mtheta,mtheta_1);
-
- dphi = 2*M_PI*rando(seed);
-
- /* Random rotation */
- polar2cart(nv,dphi,dth,vp);
-
- mvmul(mtheta_1,vp,vq);
- mvmul(mphi_1,vq,v);
-
- if (fp) {
- real cold = cos_angle(vold,v);
- real cnew = cos(dth);
- if (fabs(cold-cnew) > 1e-4)
- fprintf(fp,"cos(theta) = %8.4f should be %8.4f dth = %8.4f dphi = %8.4f\n",
- cold,cnew,dth,dphi);
- }
-}
-
-static int create_electron(int index,rvec x[],rvec v[],rvec vold[],rvec vv,
- real m[],real q[],
- rvec center,real e0,int *seed)
-{
- m[index] = ELECTRONMASS;
- q[index] = -1;
-
- clear_rvec(v[index]);
- svmul(sqrt(2*e0/m[index]),vv,v[index]);
- copy_rvec(v[index],vold[index]);
- copy_rvec(center,x[index]);
-
- return index+1;
-}
-
-static int create_pair(int index,rvec x[],rvec v[],rvec vold[],
- real m[],real q[],
- rvec center,real e0,t_eh_params *ehp,rvec dq)
-{
- static real massfactor = 2*HOLEMASS/(ELECTRONMASS*(ELECTRONMASS+HOLEMASS));
- rvec x0;
- real ve,e1;
-
- m[index] = ELECTRONMASS;
- m[index+1] = HOLEMASS;
- q[index] = -1;
- q[index+1] = 1;
-
- rand_vector(0.5*ehp->deltax,x0,&ehp->seed);
- rvec_sub(center,x0,x[index]);
- rvec_add(center,x0,x[index+1]);
-
- ve = sqrt(massfactor*e0)/(0.5*ehp->deltax);
- svmul(-ve,x0,v[index]);
- svmul(ELECTRONMASS*ve/HOLEMASS,x0,v[index+1]);
- copy_rvec(v[index],vold[index]);
- copy_rvec(v[index+1],vold[index+1]);
- e1 = 0.5*(m[index]*iprod(v[index],v[index])+
- m[index+1]*iprod(v[index+1],v[index+1]));
- if (fabs(e0-e1)/e0 > 1e-6)
- gmx_fatal(FARGS,"Error in create pair: e0 = %f, e1 = %f\n",e0,e1);
-
- return index+2;
-}
-
-static int scatter_all(FILE *fp,int nparticle,int nstep,
- rvec x[],rvec v[],rvec vold[],
- real mass[],real charge[],real ener[],real eparticle[],
- t_eh_params *ehp,int *nelec,int *nhole,t_ana_scat s[])
-{
- int i,m,np;
- real p_el,p_inel,ptot,nv,ekin,omega,theta,costheta,Q,e0,ekprime,size2,fac;
- rvec dq,center,vv;
-
- size2 = sqr(ehp->size);
- np = nparticle;
- for(i=0; (i<nparticle); i++) {
- /* Check cross sections, assume same cross sections for holes
- * as for electrons, for elastic scattering
- */
- if ((size2 == 0) || (iprod(x[i],x[i]) < size2)) {
- nv = norm(v[i]);
- ekin = eparticle[i];
- p_el = cross_el(ekin,ehp->rho,NULL)*nv*ehp->dt;
-
- /* Only electrons can scatter inelasticlly */
- if (charge[i] < 0)
- p_inel = cross_inel(ekin,ehp->rho,NULL)*nv*ehp->dt;
- else
- p_inel = 0;
-
- /* Test whether we have to scatter at all */
- ptot = (1 - (1-p_el)*(1-p_inel));
- if (debug && 0)
- fprintf(debug,"p_el = %10.3e p_inel = %10.3e ptot = %10.3e\n",
- p_el,p_inel,ptot);
- if (rando(&ehp->seed) < ptot) {
- /* Test whether we have to scatter inelastic */
- ptot = p_inel/(p_el+p_inel);
- if (rando(&ehp->seed) < ptot) {
- add_scatter_event(&(s[i]),x[i],TRUE,ehp->dt*nstep,ekin);
- /* Energy loss in inelastic collision is omega */
- if ((omega = get_omega(ekin,&ehp->seed,debug,NULL)) >= ekin)
- gmx_fatal(FARGS,"Energy transfer error: omega = %f, ekin = %f",
- omega,ekin);
- else {
- /* Scattering angle depends on energy and energy loss */
- Q = get_q_inel(ekin,omega,&ehp->seed,debug,NULL);
- costheta = -0.5*(Q+omega-2*ekin)/sqrt(ekin*(ekin-omega));
-
- /* See whether we have gained enough energy to liberate another
- * hole-electron pair
- */
- e0 = band_ener(&ehp->seed,debug,NULL);
- ekprime = e0 + omega - (ehp->Efermi+0.5*ehp->Eband);
- /* Ouput */
- fprintf(fp,"Inelastic %d: Ekin=%.2f Omega=%.2f Q=%.2f Eband=%.2f costheta=%.3f\n",
- i+1,ekin,omega,Q,e0,costheta);
- if ((costheta < -1) || (costheta > 1)) {
- fprintf(fp,"Electron/hole creation not possible due to momentum constraints\n");
- /* Scale the velocity according to the energy loss */
- svmul(sqrt(1-omega/ekin),v[i],v[i]);
- ener[eLATTICE] += omega*ELECTRONVOLT;
- }
- else {
- theta = acos(costheta);
-
- copy_rvec(v[i],dq);
- /* Rotate around theta with random delta phi */
- rotate_theta(v[i],nv,theta,&ehp->seed,debug);
- /* Scale the velocity according to the energy loss */
- svmul(sqrt(1-omega/ekin),v[i],v[i]);
- rvec_dec(dq,v[i]);
-
- if (ekprime > 0) {
- if (np >= ehp->maxparticle-2)
- gmx_fatal(FARGS,"Increase -maxparticle flag to more than %d",
- ehp->maxparticle);
- if (ehp->bHole) {
- np = create_pair(np,x,v,vold,mass,charge,x[i],
- ekprime*ELECTRONVOLT,ehp,dq);
- (*nhole)++;
- }
- else {
- copy_rvec(x[i],center);
- center[ZZ] += ehp->deltax;
- rand_vector(1,vv,&ehp->seed);
- np = create_electron(np,x,v,vold,vv,mass,charge,
- x[i],ekprime*ELECTRONVOLT,&ehp->seed);
- }
- ener[eLATTICE] += (omega-ekprime)*ELECTRONVOLT;
- (*nelec)++;
- }
- else
- ener[eLATTICE] += omega*ELECTRONVOLT;
- }
- }
- }
- else {
- add_scatter_event(&(s[i]),x[i],FALSE,ehp->dt*nstep,ekin);
- if (debug)
- fprintf(debug,"Elastic scattering event\n");
-
- /* Scattering angle depends on energy only */
- theta = get_theta_el(ekin,&ehp->seed,debug,NULL);
- /* Rotate around theta with random delta phi */
- rotate_theta(v[i],nv,theta,&ehp->seed,debug);
- }
- }
- }
- }
- return np;
-}
-
-static void integrate_velocities(int nparticle,rvec vcur[],rvec vnext[],
- rvec f[],real m[],real dt)
-{
- int i,k;
-
- for(i=0; (i<nparticle); i++)
- for(k=0; (k<DIM); k++)
- vnext[i][k] = vcur[i][k] + f[i][k]*dt/m[i];
-}
-
-static void integrate_positions(int nparticle,rvec x[],rvec v[],real dt)
-{
- int i,k;
-
- for(i=0; (i<nparticle); i++)
- for(k=0; (k<DIM); k++)
- x[i][k] += v[i][k]*dt;
-}
-
-static void print_header(FILE *fp,t_eh_params *ehp)
-{
- fprintf(fp,"Welcome to the electron-hole simulation!\n");
- fprintf(fp,"The energies printed in this file are in eV\n");
- fprintf(fp,"Coordinates are in nm because of fixed width format\n");
- fprintf(fp,"Atomtypes are used for coloring in rasmol\n");
- fprintf(fp,"O: electrons (red), N: holes (blue)\n");
- fprintf(fp,"Parametes for this simulation\n");
- fprintf(fp,"seed = %d maxstep = %d dt = %g\n",
- ehp->seed,ehp->maxstep,ehp->dt);
- fprintf(fp,"nsave = %d nana = %d Force = %s Scatter = %s Hole = %s\n",
- ehp->nsave,ehp->nana,gmx_bool_names[ehp->bForce],
- gmx_bool_names[ehp->bScatter],gmx_bool_names[ehp->bHole]);
- if (ehp->bForce)
- fprintf(fp,"Force constant for repulsion Alj = %g\n",ehp->Alj);
-}
-
-static void do_sim(FILE *fp,char *pdbfn,t_eh_params *ehp,
- int *nelec,int *nhole,t_ana_struct *total,
- t_histo *hmfp,t_ana_ener *ae,int serial)
-{
- FILE *efp;
- int nparticle[2];
- rvec *x,*v[2],*f,center,vv;
- real *charge,*mass,*ener,*eparticle;
- t_ana_struct *ana_struct;
- t_ana_scat *ana_scat;
- int step,i,cur = 0;
-#define next (1-cur)
-
- /* Open output file */
- fprintf(fp,"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
- fprintf(fp,"Simulation %d/%d\n",serial+1,ehp->nsim);
-
- ana_struct = init_ana_struct(ehp->maxstep,ehp->nana,ehp->dt,
- ehp->maxparticle);
- /* Initiate arrays. The charge array determines whether a particle is
- * a hole (+1) or an electron (-1)
- */
- snew(x,ehp->maxparticle); /* Position */
- snew(v[0],ehp->maxparticle); /* Velocity */
- snew(v[1],ehp->maxparticle); /* Velocity */
- snew(f,ehp->maxparticle); /* Force */
- snew(charge,ehp->maxparticle); /* Charge */
- snew(mass,ehp->maxparticle); /* Mass */
- snew(eparticle,ehp->maxparticle); /* Energy per particle */
- snew(ana_scat,ehp->maxparticle); /* Scattering event statistics */
- snew(ener,eNR); /* Eenergies */
-
- clear_rvec(center);
- /* Use first atom as center, it has coordinate 0,0,0 */
- if (ehp->bScatter) {
- /* Start with an Auger electron */
- nparticle[cur]=0;
- for(i=0; (i<ehp->nevent); i++) {
- if (ehp->nevent == 1) {
- clear_rvec(vv);
- vv[ZZ] = 1;
- }
- else
- rand_vector(1,vv,&ehp->seed);
- nparticle[cur] = create_electron(nparticle[cur],x,v[cur],v[next],
- vv,mass,charge,center,
- ehp->Eauger*ELECTRONVOLT,&ehp->seed);
- rand_vector(ehp->evdist*0.1,vv,&ehp->seed);
- rvec_inc(center,vv);
- }
- }
- else if (ehp->bForce) {
- /* Start with two electron and hole pairs */
- nparticle[cur] = create_pair(0,x,v[cur],v[next],mass,charge,center,
- 0.2*ehp->Eauger*ELECTRONVOLT,ehp,center);
- center[ZZ] = 0.5; /* nm */
- (*nelec)++;
- (*nhole)++;
- }
- else {
- fprintf(fp,"Nothing to do. Doei.\n");
- return;
- }
- nparticle[next] = nparticle[cur];
- for(step=0; (step<=ehp->maxstep); step++) {
- if (ehp->bScatter)
- nparticle[next] = scatter_all(fp,nparticle[cur],step,x,v[cur],v[next],
- mass,charge,ener,eparticle,ehp,
- nelec,nhole,ana_scat);
-
- if (ehp->bForce)
- calc_forces(nparticle[cur],x,f,charge,ener,ehp->Alj);
-
- integrate_velocities(nparticle[next],v[cur],v[next],f,mass,ehp->dt);
-
- calc_ekin(nparticle[next],v[cur],v[next],charge,mass,ener,eparticle);
- ener[eTOT] = ener[eKIN] + ener[ePOT];
-
- /* Produce output whenever the user says so, or when new
- * particles have been created.
- */
- if ((step == ehp->maxstep) ||
- ((ehp->nana != 0) && ((step % ehp->nana) == 0))) {
- analyse_structure(ana_struct,(step*ehp->dt),center,x,
- nparticle[next],charge);
- add_ana_ener(ae,(step/ehp->nana),ener);
- }
- cur = next;
-
- integrate_positions(nparticle[cur],x,v[cur],ehp->dt);
- }
- for(i=0; (i<nparticle[cur]); i++) {
- analyse_scatter(&(ana_scat[i]),hmfp);
- done_scatter(&(ana_scat[i]));
- }
- sfree(ener);
- sfree(ana_scat);
- sfree(eparticle);
- sfree(mass);
- sfree(charge);
- sfree(f);
- sfree(v[1]);
- sfree(v[0]);
- sfree(x);
- dump_as_pdb(pdbfn,ana_struct);
- add_ana_struct(total,ana_struct);
- done_ana_struct(ana_struct);
- sfree(ana_struct);
-}
-
-void do_sims(int NFILE,t_filenm fnm[],t_eh_params *ehp)
-{
- t_ana_struct *total;
- t_ana_ener *ae;
- t_histo *helec,*hmfp;
- int *nelectron;
- int i,imax,ne,nh;
- real aver;
- FILE *fp,*logfp;
- char *pdbbuf,*ptr,*rptr;
-
- ptr = ftp2fn(efPDB,NFILE,fnm);
- rptr = strdup(ptr);
- if ((ptr = strstr(rptr,".pdb")) != NULL)
- *ptr = '\0';
- snew(pdbbuf,strlen(rptr)+10);
-
- total = init_ana_struct(ehp->maxstep,ehp->nana,ehp->dt,1);
- hmfp = init_histo((int)ehp->Eauger,0,(int)ehp->Eauger);
- helec = init_histo(500,0,500);
- snew(ae,1);
-
- logfp = gmx_ffopen(ftp2fn(efLOG,NFILE,fnm),"w");
- print_header(logfp,ehp);
-
- for(i=0; (i<ehp->nsim); i++) {
- nh = ne = 0;
- sprintf(pdbbuf,"%s-%d.pdb",rptr,i+1);
- do_sim(logfp,pdbbuf,ehp,&ne,&nh,total,hmfp,ae,i);
- add_histo(helec,ne,1);
- fprintf(stderr,"\rSim: %d/%d",i+1,ehp->nsim);
- }
- fprintf(stderr,"\n");
- gmx_ffclose(logfp);
-
- sfree(rptr);
- sfree(pdbbuf);
- dump_ana_struct(opt2fn("-maxdist",NFILE,fnm),opt2fn("-nion",NFILE,fnm),
- opt2fn("-gyr_com",NFILE,fnm),opt2fn("-gyr_origin",NFILE,fnm),
- total,ehp->nsim);
- dump_ana_ener(ae,ehp->nsim,ehp->dt*ehp->nana,
- opt2fn("-ener",NFILE,fnm),total);
- done_ana_struct(total);
-
- dump_histo(helec,opt2fn("-histo",NFILE,fnm),
- "Number of cascade electrons","N","",enormFAC,1.0/ehp->nsim);
- dump_histo(hmfp,opt2fn("-mfp",NFILE,fnm),
- "Mean Free Path","Ekin (eV)","MFP (nm)",enormNP,1.0);
-}
-
-int main(int argc,char *argv[])
-{
- const char *desc[] = {
- "[TT]ehole[tt] performs a molecular dynamics simulation of electrons and holes",
- "in an implicit lattice. The lattice is modeled through scattering cross",
- "sections, for elastic and inelastic scattering.",
- "A detailed description of the scatterning processes simulated in ehole",
- "can be found in Timneanu et al. Chemical Physics 299 (2004) 277-283",
- "The paper also includes a description how to calculate the input files.[PAR]",
- "Description of the input files for [TT]ehole[tt]:[BR]",
- "[TT]-sigel.dat[tt]: elastic cross section (per atom). Two columns: Impact electron energy (eV) vs Elastic cross section (A2).[BR]",
- "[TT]-siginel.dat[tt]: inelastic cross section (per atom). Two columns: Impact electron energy (eV) vs Inelastic cross section (A2).[BR]",
- "[TT]-band-ener.dat[tt]: Probability of finding an electron in the valence band.",
- "Two columns: Impact electron energy (eV) vs Probability[BR]",
- "[TT]-eloss.dat[tt]: Probability of energy loss due to inelastic scattering. Three columns: Impact electron energy (eV) vs Integrated probability vs Energy loss in inelastic scattering (eV).[BR]",
- "[TT]-theta-el.dat[tt]: Probability of elastic scattering angle. Three columns: Impact electron energy (eV) vs Integrated probability vs Scattering angle (rad).[BR]",
- "[TT]-qtrans.dat[tt]: Four columns: Impact electron energy (eV) vs Inelastic energy loss (eV) vs Integrated probability vs Scattering angle (rad).[PAR]",
- "The program produces a number of output files. It is important that",
- "the actual content is well-defined, sucht that no misunderstanding can",
- "occur (famous last words...). Anyway, the program does a number of",
- "simulations, and averages results over these. Here is a list of each of",
- "the results and how they are computed:[BR]",
- "[TT]-histo[tt] Distribution of nuber of liberated secondary electrons per simulation.[BR]",
- "[TT]-maxdist[tt] The maximum distance from the origin that any electron in any simulation reaches.[BR]",
- "[TT]-gyr_com[tt] The radius of gyration of the electron cloud with respect to its center of mass (contains 4 columns).[BR]",
- "[TT]-gyr_origin[tt] The radius of gyration of the electron cloud with respect to the origin (contains 4 columns).[BR]",
- "[TT]-mfp[tt] The mean free path of the electrons as a function of energy. If this is not a smooth curve you need to increase the number of simulations.[BR]",
- "[TT]-nion[tt] The number of ions as a function of time, averaged over simulations.[BR]",
- "[TT]-ener[tt] The energy terms in the simulation (note that there are multiple columns, so use [TT]xmgrace -nxy[tt]). This shows important information about the stability of the simulation, that is the total energy should be conserved. In this figure you can also inspect the kinetic energy per electron in order to check whether the electrons have thermalized.[BR]"
- };
- static t_eh_params ehp = {
- 100, /* Max number of particles. Is a parameter but should be dynamic */
- 100000, /* Number of integration steps */
- 1, /* nsave */
- 1, /* nana */
- 1, /* nsim */
- 1993, /* Random seed */
- 1, /* Number of events */
- FALSE, /* Use forces */
- TRUE, /* Use scattering */
- FALSE, /* Creat holes */
- 1e-5, /* Time step */
- 0.05, /* Distance (nm) between electron and hole when creating them */
- 1.0, /* Dielectric constant */
- 0.1, /* Force constant for repulsion function */
- 250, /* Starting energy for the first Auger electron */
- 28.7, /* Fermi level (eV) of diamond. */
- 5.46, /* Band gap energy (eV) of diamond */
- 3.51, /* Density of the solid */
- 12.011, /* (Average) mass of the atom */
- 10000.0,/* Distance between events */
- 0.0 /* Size of the system */
- };
- static gmx_bool bTest = FALSE;
- t_pargs pa[] = {
- { "-maxparticle", FALSE, etINT, {&ehp.maxparticle},
- "Maximum number of particles" },
- { "-maxstep", FALSE, etINT, {&ehp.maxstep},
- "Number of integration steps" },
- { "-nsim", FALSE, etINT, {&ehp.nsim},
- "Number of independent simulations writing to different output files" },
- { "-nsave", FALSE, etINT, {&ehp.nsave},
- "Number of steps after which to save output. 0 means only when particles created. Final step is always written." },
- { "-nana", FALSE, etINT, {&ehp.nana},
- "Number of steps after which to do analysis." },
- { "-seed", FALSE, etINT, {&ehp.seed},
- "Random seed" },
- { "-dt", FALSE, etREAL, {&ehp.dt},
- "Integration time step (ps)" },
- { "-rho", FALSE, etREAL, {&ehp.rho},
- "Density of the sample (kg/l). Default is for Diamond" },
- { "-matom", FALSE, etREAL, {&ehp.matom},
- "Mass (a.m.u.) of the atom in the solid. Default is C" },
- { "-fermi", FALSE, etREAL, {&ehp.Efermi},
- "Fermi energy (eV) of the sample. Default is for Diamond" },
- { "-gap", FALSE, etREAL, {&ehp.Eband},
- "Band gap energy (eV) of the sample. Default is for Diamond" },
- { "-auger", FALSE, etREAL, {&ehp.Eauger},
- "Impact energy (eV) of first electron" },
- { "-dx", FALSE, etREAL, {&ehp.deltax},
- "Distance between electron and hole when creating a pair" },
- { "-test", FALSE, etBOOL, {&bTest},
- "Test table aspects of the program rather than running it for real" },
- { "-force", FALSE, etBOOL, {&ehp.bForce},
- "Apply Coulomb/Repulsion forces" },
- { "-hole", FALSE, etBOOL, {&ehp.bHole},
- "Create electron-hole pairs rather than electrons only" },
- { "-scatter", FALSE, etBOOL, {&ehp.bScatter},
- "Do the scattering events" },
- { "-nevent", FALSE, etINT, {&ehp.nevent},
- "Number of initial Auger electrons" },
- { "-evdist", FALSE, etREAL, {&ehp.evdist},
- "Average distance (A) between initial electronss" },
- { "-size", FALSE, etREAL, {&ehp.size},
- "Size of the spherical system. If 0, then it is infinite" }
- };
-#define NPA asize(pa)
- t_filenm fnm[] = {
- { efLOG, "-g", "ehole", ffWRITE },
- { efDAT, "-sigel", "sigel", ffREAD },
- { efDAT, "-sigin", "siginel", ffREAD },
- { efDAT, "-eloss", "eloss", ffREAD },
- { efDAT, "-qtrans", "qtrans", ffREAD },
- { efDAT, "-band", "band-ener", ffREAD },
- { efDAT, "-thetael", "theta-el", ffREAD },
- { efPDB, "-o", "ehole", ffWRITE },
- { efXVG, "-histo", "histo", ffWRITE },
- { efXVG, "-maxdist", "maxdist", ffWRITE },
- { efXVG, "-gyr_com", "gyr_com", ffWRITE },
- { efXVG, "-gyr_origin", "gyr_origin", ffWRITE },
- { efXVG, "-mfp", "mfp", ffWRITE },
- { efXVG, "-nion", "nion", ffWRITE },
- { efXVG, "-ener", "ener", ffWRITE }
- };
-#define NFILE asize(fnm)
- int seed;
-
- CopyRight(stdout,argv[0]);
- parse_common_args(&argc,argv,0,NFILE,fnm,
- NPA,pa,asize(desc),desc,0,NULL);
- please_cite(stdout,"Timneanu2004a");
-
- if (ehp.deltax <= 0)
- gmx_fatal(FARGS,"Delta X should be > 0");
- ehp.Alj = FACEL*pow(ehp.deltax,5);
- ehp.rho = (ehp.rho/ehp.matom)*AVOGADRO*1e-21;
-
- init_tables(NFILE,fnm,ehp.rho);
-
- if (bTest)
- test_tables(&ehp.seed,ftp2fn(efPDB,NFILE,fnm),ehp.rho);
- else
- do_sims(NFILE,fnm,&ehp);
-
- gmx_thanx(stdout);
-
- return 0;
-}
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.3.99_development_20071104
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2006, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Groningen Machine for Chemical Simulation
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gromacs/utility/smalloc.h"
-#include "macros.h"
-#include "gromacs/commandline/pargs.h"
-#include "random.h"
-#include "names.h"
-#include "gromacs/fileio/matio.h"
-#include "gromacs/math/units.h"
-#include "gromacs/math/vec.h"
-#include "gromacs/utility/futil.h"
-#include "copyrite.h"
-#include "gromacs/fileio/tpxio.h"
-
-int main(int argc,char *argv[])
-{
- static char *desc[] = {
- "[TT]g_anavel[tt] computes temperature profiles in a sample. The sample",
- "can be analysed radial, i.e. the temperature as a function of",
- "distance from the center, cylindrical, i.e. as a function of distance",
- "from the vector (0,0,1) through the center of the box, or otherwise",
- "(will be specified later)"
- };
- t_filenm fnm[] = {
- { efTRN, "-f", NULL, ffREAD },
- { efTPX, "-s", NULL, ffREAD },
- { efXPM, "-o", "xcm", ffWRITE }
- };
-#define NFILE asize(fnm)
-
- static int mode = 0, nlevels = 10;
- static real tmax = 300, xmax = -1;
- t_pargs pa[] = {
- { "-mode", FALSE, etINT, {&mode}, "mode" },
- { "-nlevels", FALSE, etINT, {&nlevels}, "number of levels" },
- { "-tmax", FALSE, etREAL, {&tmax}, "max temperature in output" },
- { "-xmax", FALSE, etREAL, {&xmax}, "max distance from center" }
- };
-
- FILE *fp;
- int *npts,nmax;
- int status;
- int i,j,idum,step,nframe=0,index;
- real temp,rdum,hboxx,hboxy,scale,xnorm=0;
- real **profile=NULL;
- real *t_x=NULL,*t_y,hi=0;
- t_topology *top;
- int d,m,n;
- matrix box;
- atom_id *sysindex;
- gmx_bool bHaveV,bReadV;
- t_rgb rgblo = { 0, 0, 1 },rgbhi = { 1, 0, 0 };
- int flags = TRX_READ_X | TRX_READ_V;
- t_trxframe fr;
-
-
- CopyRight(stderr,argv[0]);
- parse_common_args(&argc,argv,PCA_CAN_TIME,NFILE,fnm,
- asize(pa),pa,asize(desc),desc,0,NULL);
-
- top = read_top(ftp2fn(efTPX,NFILE,fnm));
-
- read_first_frame(&status,ftp2fn(efTRX,NFILE,fnm),&fr,flags);
-
- if (xmax > 0) {
- scale = 5;
- nmax = xmax*scale;
- }
- else {
- scale = 5;
- nmax = (0.5*sqrt(sqr(box[XX][XX])+sqr(box[YY][YY])))*scale;
- }
- snew(npts,nmax+1);
- snew(t_y,nmax+1);
- for(i=0; (i<=nmax); i++) {
- npts[i] = 0;
- t_y[i] = i/scale;
- }
- do {
- srenew(profile,++nframe);
- snew(profile[nframe-1],nmax+1);
- srenew(t_x,nframe);
- t_x[nframe-1] = fr.time*1000;
- hboxx = box[XX][XX]/2;
- hboxy = box[YY][YY]/2;
- for(i=0; (i<fr.natoms); i++) {
- /* determine position dependent on mode */
- switch (mode) {
- case 0:
- xnorm = sqrt(sqr(fr.x[i][XX]-hboxx) + sqr(fr.x[i][YY]-hboxy));
- break;
- default:
- gmx_fatal(FARGS,"Unknown mode %d",mode);
- }
- index = xnorm*scale;
- if (index <= nmax) {
- temp = top->atoms.atom[i].m*iprod(fr.v[i],fr.v[i])/(2*BOLTZ);
- if (temp > hi)
- hi = temp;
- npts[index]++;
- profile[nframe-1][index] += temp;
- }
- }
- for(i=0; (i<=nmax); i++) {
- if (npts[i] != 0)
- profile[nframe-1][i] /= npts[i];
- npts[i] = 0;
- }
- } while (read_next_frame(status,&fr));
- close_trx(status);
-
- fp = ftp2FILE(efXPM,NFILE,fnm,"w");
- write_xpm(fp,0,"Temp. profile","T (a.u.)",
- "t (fs)","R (nm)",
- nframe,nmax+1,t_x,t_y,profile,0,tmax,
- rgblo,rgbhi,&nlevels);
-
- gmx_thanx(stderr);
-
- return 0;
-}
-
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.3.99_development_20071104
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2006, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Groningen Machine for Chemical Simulation
- */
-#include <math.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "copyrite.h"
-#include "typedefs.h"
-#include "macros.h"
-#include "gromacs/math/vec.h"
-#include "gromacs/commandline/pargs.h"
-#include "coulomb.h"
-
-enum { mGuillot2001a, mAB1, mLjc, mMaaren, mGuillot_Maple, mHard_Wall, mGG, mGG_qd_q, mGG_qd_qd, mGG_q_q, mNR };
-
-static double erf2(double x)
-{
- return -(2*x*M_2_SQRTPI)*exp(-x*x);
-}
-
-static double erf1(double x)
-{
- return M_2_SQRTPI*exp(-x*x);
-}
-
-static void do_hard(FILE *fp,int pts_nm,double efac,double delta)
-{
- int i,k,imax;
- double x,vr,vr2,vc,vc2;
-
- if (delta < 0)
- gmx_fatal(FARGS,"Delta should be >= 0 rather than %f\n",delta);
-
- imax = 3.0*pts_nm;
- for(i=0; (i<=imax); i++) {
- x = i*(1.0/pts_nm);
-
- if (x < delta) {
- /* Avoid very high numbers */
- vc = vc2 = 1/delta;
- }
- else {
- vc = 1/(x);
- vc2 = 2/pow(x,3);
- }
- vr = erfc(efac*(x-delta))/2;
- vr2 = (1-erf2(efac*(x-delta)))/2;
- fprintf(fp,"%12.5e %12.5e %12.5e %12.5e %12.5e %12.5e %12.5e\n",
- x,vr,vr2,0.0,0.0,vc,vc2);
- }
-
-}
-
-static void do_AB1(FILE *fp,int eel,int pts_nm,int ndisp,int nrep)
-{
- int i,k,imax;
- double myfac[3] = { 1, -1, 1 };
- double myexp[3] = { 1, 6, 0 };
- double x,v,v2;
-
- myexp[1] = ndisp;
- myexp[2] = nrep;
- imax = 3.0*pts_nm;
- for(i=0; (i<=imax); i++) {
- x = i*(1.0/pts_nm);
-
- fprintf(fp,"%12.5e",x);
-
- for(k=0; (k<3); k++) {
- if (x < 0.04) {
- /* Avoid very high numbers */
- v = v2 = 0;
- }
- else {
- v = myfac[k]*pow(x,-myexp[k]);
- v2 = (myexp[k]+1)*(myexp[k])*v/(x*x);
- }
- fprintf(fp," %12.5e %12.5e",v,v2);
- }
- fprintf(fp,"\n");
- }
-}
-
-static void lo_do_ljc(double r,
- double *vc,double *fc,
- double *vd,double *fd,
- double *vr,double *fr)
-{
- double r2,r_6,r_12;
-
- r2 = r*r;
- r_6 = 1.0/(r2*r2*r2);
- r_12 = r_6*r_6;
-
- *vc = 1.0/r; /* f(x) Coulomb */
- *fc = 1.0/(r2); /* -f'(x) */
-
- *vd = -r_6; /* g(c) Dispersion */
- *fd = 6.0*(*vd)/r; /* -g'(x) */
-
- *vr = r_12; /* h(x) Repulsion */
- *fr = 12.0*(*vr)/r; /* -h'(x) */
-}
-
-/* use with coulombtype = user */
-static void lo_do_ljc_pme(double r,
- double rcoulomb, double ewald_rtol,
- double *vc,double *fc,
- double *vd,double *fd,
- double *vr,double *fr)
-{
- double r2,r_6,r_12;
- double ewc;
-
- ewc = calc_ewaldcoeff(rcoulomb,ewald_rtol);
-
- r2 = r*r;
- r_6 = 1.0/(r2*r2*r2);
- r_12 = r_6*r_6;
-
- *vc = erfc(ewc*r)/r;
- /* *vc2 = 2*erfc(ewc*r)/(r*r2)+2*exp(-(ewc*ewc*r2))*ewc*M_2_SQRTPI/r2+
- 2*ewc*ewc*ewc*exp(-(ewc*ewc*r2))*M_2_SQRTPI;*/
- *fc = ewc*exp(-ewc*ewc*r2)*M_2_SQRTPI/r + erfc(ewc*r)/r2;
-
- *vd = -r_6;
- *fd = -6.0*(*vd)/r;
-
- *vr = r_12;
- *fr = 12.0*(*vr)/r;
-}
-
-static void lo_do_guillot(double r,double xi, double xir,
- double *vc,double *fc,
- double *vd,double *fd,
- double *vr,double *fr)
-{
- double qO = -0.888;
- double qOd = 0.226;
- double f0 = qOd/qO;
- double sqpi = sqrt(M_PI);
- double rxi1,rxi2,z;
- double r2,r_6;
-
- r2 = r*r;
- r_6 = 1.0/(r2*r2*r2);
-
- rxi1 = r/(2*xi);
- rxi2 = r/(sqrt(2)*xi);
- *vc = (1 + f0*f0*erf(r/(2*xi)) + 2*f0*erf(r/(sqrt(2)*xi)) )/r;
-
- *fc = f0*f0*erf(r/(2*xi)) + 2*f0*erf(r/(sqrt(2)*xi));
- ;
- /* MuPad: Uc := erf(r/(2*xi))/r +
-
- Mathematica:
- r1 := r/(2*xi);
- r2 := r/(Sqrt[2] * xi);
- Uc[r_] := (1 + f0 * f0 * Erf[r/(2*xi)] + 2 * f0 * Erf[r/(Sqrt[2]*xi)]) / r;
- -D[Uc[r],r]
- CForm=
- -(((2*f0*Sqrt(2/Pi))/(Power(E,Power(r,2)/(2.*Power(xi,2)))*xi) +
- Power(f0,2)/(Power(E,Power(r,2)/(4.*Power(xi,2)))*Sqrt(Pi)*xi))/r) +
- (1 + Power(f0,2)*Erf(r/(2.*xi)) + 2*f0*Erf(r/(Sqrt(2)*xi)))/Power(r,2)
-
-
-Uc1[r_] := 1/r;
--D[Uc1[r],r]
- -2
-Out[20]= r
-
-Uc2[r_] := f0^2 * Erf[r1] / r;
--D[Uc2[r],r]
-
-
-Uc3[r_] := 2 * f0 * Erf[r2]/ r;
--D[Uc3[r],r]
-
-Uc[r_] := Erf[r/(2*xi)] / r
-
-D[Uc[r],r]
-
-
-D[Erf[r],r]
-
-*/
- *vc = (1 + sqr(f0)*erf(rxi1) + 2*f0*erf(rxi2))/r;
- *fc =
- (1/r
- + (- f0 * (2 * sqrt(2) + exp(r2/4*xi*xi)*f0)/(exp(r2/(2*xi*xi))*sqrt(M_PI)*xi) + f0*f0*erf(r/(2*xi)) + 2 *f0 * erf(r/(sqrt(2 * xi))) )/r2)
- ;
-
-
- /* *vc2 = ((2/sqr(r))*(*vc -
- sqr(f0)*erf1(r1)/(2*xi) -
- 4*f0*erf1(r2)/sqrt(2)*xi) +
- (1/r)*(sqr(f0/(2.0*xi))*erf2(r1) + (2*f0/sqr(xi)))*erf2(r2)); */
-
- *vd = -r_6;
- *fd = -6.0*(*vd)/r;
-
- z = r/(2.0*xir);
- *vr = erfc(z)/z;
- *fr = 0.0;
- // *vr2 = (sqpi*(*vr)/(2.0*z*z)+(1.0/(z*z)+1)*exp(-z*z))/(sqpi*sqr(xir));
-}
-
-void lo_do_guillot_maple(double r,double xi,double xir,
- double *vc,double *vc2,
- double *vd,double *vd2,
- double *vr,double *vr2)
-{
- double qO = -0.888;
- double qOd = 0.226;
- double f0 = qOd/qO;
- double sqpi = sqrt(M_PI);
-
- *vc = pow(-f0/(1.0+f0)+1.0,2.0)/r+pow(-f0/(1.0+f0)+1.0,2.0)*f0*f0*erf(r/xi/2.0)/r+2.0*pow(-f0/(1.0+f0)+1.0,2.0)*f0*erf(r*sqrt(2.0)/xi/2.0)/r;
- *vc2 = 2.0*pow(-f0/(1.0+f0)+1.0,2.0)/(r*r*r)-pow(-f0/(1.0+f0)+1.0,2.0)*f0*f0/sqrt(M_PI)/(xi*xi*xi)*exp(-r*r/(xi*xi)/4.0)/2.0-2.0*pow(-f0/(1.0+f0)+1.0,2.0)*f0*f0/sqrt(M_PI)*exp(-r*r/(xi*xi)/4.0)/xi/(r*r)+2.0*pow(-f0/(1.0+f0)+1.0,2.0)*f0*f0*erf(r/xi/2.0)/(r*r*r)-2.0*pow(-f0/(1.0+f0)+1.0,2.0)*f0/sqrt(M_PI)/(xi*xi*xi)*exp(-r*r/(xi*xi)/2.0)*sqrt(2.0)-4.0*pow(-f0/(1.0+f0)+1.0,2.0)*f0/sqrt(M_PI)*exp(-r*r/(xi*xi)/2.0)*sqrt(2.0)/xi/(r*r)+4.0*pow(-f0/(1.0+f0)+1.0,2.0)*f0*erf(r*sqrt(2.0)/xi/2.0)/(r*r*r);
-
- *vd = -1.0/(r*r*r*r*r*r);
- *vd2 = -42.0/(r*r*r*r*r*r*r*r);
- *vr = 2.0*erfc(r/xir/2.0)/r*xir;
- *vr2 = 1.0/sqrt(M_PI)/(xir*xir)*exp(-r*r/(xir*xir)/4.0)+4.0/sqrt(M_PI)*exp(-r*r/(xir*xir)/4.0)/(r*r)+4.0*erfc(r/xir/2.0)/(r*r*r)*xir;
-}
-
-static void lo_do_GG(double r,double xi,double xir,
- double *vc,double *fc,
- double *vd,double *fd,
- double *vr,double *fr)
-{
- double qO = -0.888;
- double qOd = 0.226;
- double f0 = qOd/qO;
- double sqpi = sqrt(M_PI);
- double r2,xi2;
-
- r2 = r*r;
- xi2 = xi*xi;
-
- *vc = 1.0/r + f0*f0*erf(r/(2*xi))/r + 2*f0*erf(r/(sqrt(2)*xi))/r;
-
- // -D[1/r,r] -D[f0*f0*Erf[r/(2*xi)]/r,r] -D[2*f0*Erf[r/(Sqrt[2]*xi)]/r,r]
- *fc = (
- 1.0/r2 +
- f0*f0*(-exp(-r2/(4*xi2))/(sqrt(M_PI) * r * xi) + erf(r/(2*xi))/r2) +
- 2*f0*(-sqrt(2.0/M_PI)*exp(-r2/(2*xi2))/ (r*xi) + erf(r/(sqrt(2)*xi))/r2)
- );
-
- // -D[1/r^6,r]
- *vd = -1.0/(r*r*r*r*r*r);
- *fd = 6.0*(*vd)/r;
-
- // -D[2*xir*Erfc[r/(2*xir)]/r,r]
- *vr = 2.*xir*erfc(r/(2.*xir))/r;
- *fr = -(-2.*exp(-r2/(4*xir*xir)) / (sqrt(M_PI)*r) - 2*xir*erfc(r/(2*xir))/r2 );
-
-}
-
-/* Guillot2001 diffuse charge - diffuse charge interaction
- Mathematica
-
-In[19]:= Uc[r_] := Erf[r/(2*xi)]/r
-
-In[20]:= -D[Uc[r],r]
-
- r
- Erf[----]
- 1 2 xi
-Out[20]= -(-------------------------) + ---------
- 2 2 2
- r /(4 xi ) r
- E Sqrt[Pi] r xi
-*/
-void lo_do_GG_qd_qd(double r,double xi,double xir,
- double *vc,double *fc,
- double *vd,double *fd,
- double *vr,double *fr)
-{
- double sqpi = sqrt(M_PI);
-
- *vc = erf(r/(2*xi))/r;
- //erf((r*(1.0/2.0))/xi)/r;
- *fc = -(1.0/(exp(r*r/(4*xi*xi))*sqpi*r*xi)) + (erf(r/2*xi)/(r*r));
-
- //2.0*pow(r, -3.0)*erf((r*(1.0/2.0))/xi) - (1.0/2.0)*pow(M_PI, -1.0/2.0)*pow(xi, -3.0)*exp((-1.0/4.0)*(r*r)*pow(xi, -2.0)) - (2.0*pow(M_PI, -1.0/2.0)*pow(r, -2.0)*exp((-1.0/4.0)*(r*r)*pow(xi, -2.0)))/xi ;
- *vd = 0.0;
- *fd = 0.0;
- *vr = 0.0;
- *fr = 0.0;
-}
-
-/* Guillot2001 charge - diffuse charge interaction eqn 4 & 5
- Mathematica
-In[17]:= Uc[r_] := Erf[r/(Sqrt[2]*xi)]/r
-
-In[18]:= -D[Uc[r],r]
-
- 2 r
- Sqrt[--] Erf[----------]
- Pi Sqrt[2] xi
-Out[18]= -(----------------) + ---------------
- 2 2 2
- r /(2 xi ) r
- E r xi
-*/
-void lo_do_GG_q_qd(double r,double xi,double xir,
- double *vc,double *fc,
- double *vd,double *fd,
- double *vr,double *fr)
-{
- double sqpi = sqrt(M_PI);
-
- *vc = erf(r/(sqrt(2)*xi)) / r;
- //erf(((1.0/2.0)*pow(2.0, 1.0/2.0)*r)/xi)/r ;
- *fc = -(sqrt(2/M_PI)/(exp(r*r/(2*xi*xi))*r*xi)) + (erf(r/(sqrt(2)*xi))/(r*r));
- //2.0*pow(r, -3.0)*erf(((1.0/2.0)*pow(2.0, 1.0/2.0)*r)/xi) - pow(2.0, 1.0/2.0)*pow(M_PI, -1.0/2.0)*pow(xi, -3.0)*exp((-1.0/2.0)*(r*r)*pow(xi, -2.0)) - (2.0*pow(2.0, 1.0/2.0)*pow(M_PI, -1.0/2.0)*pow(r, -2.0)*exp((-1.0/2.0)*(r*r)*pow(xi, -2.0)))/xi ;
-
- *vd = 0.0;
- *fd = 0.0;
- *vr = 0.0;
- *fr = 0.0;
-}
-
-/* Guillot2001 charge - charge interaction (normal coulomb), repulsion and dispersion
- Mathematica
-
-In[6]:= Uc[r_] := 1.0/r
-
-In[7]:= -D[Uc[r],r]
-
- 1.
-Out[7]= --
- 2
- r
-
-In[8]:= Ud[r_] := -1.0/r^6
-
-In[9]:= -D[Ud[r],r]
-
- -6.
-Out[9]= ---
- 7
- r
-
-In[13]:= Ur[r_] := (2*xir)*Erfc[r/(2*xir)]/r
-
-In[14]:= -D[Ur[r],r]
- r
- 2 xir Erfc[-----]
- 2 2 xir
-Out[16]= ----------------------- + -----------------
- 2 2 2
- r /(4 xir ) r
- E Sqrt[Pi] r
-
-
-*/
-void lo_do_GG_q_q(double r,double xi,double xir,
- double *vc,double *fc,
- double *vd,double *fd,
- double *vr,double *fr)
-{
- double sqpi = sqrt(M_PI);
-
- *vc = 1.0/r;
- *fc = 1.0/(r*r);
-
- *vd = -1.0/(r*r*r*r*r*r);
- *fd = -6.0/(r*r*r*r*r*r*r);
-
- *vr = (2.0*xir*erfc(r/(2.0*xir)))/r;
- *fr = 2.0/(exp((r*r)/(4*xir*xir)) * sqpi *r) + (2*xir*erfc((r*xir)/2.0))/(r*r);
- //4.0*pow(M_PI, -1.0/2.0)*pow(r, -2.0)*exp((-1.0/4.0)*(r*r)*pow(xir, -2.0)) + pow(M_PI, -1.0/2.0)*pow(xir, -2.0)*exp((-1.0/4.0)*(r*r)*pow(xir, -2.0)) + 4.0*pow(r, -3.0)*xir*erfc((r*(1.0/2.0))/xir);
-}
-
-static void do_guillot(FILE *fp,int eel,int pts_nm,double rc,double rtol,double xi,double xir)
-{
- int i,i0,imax;
- double r,vc,fc,vd,fd,vr,fr;
-
- imax = 3*pts_nm;
- for(i=0; (i<=imax); i++) {
- r = i*(1.0/pts_nm);
- /* Avoid very large numbers */
- if (r < 0.04) {
- vc = fc = vd = fd = vr = fr = 0;
- }
- else
- if (eel == eelPME) {
- fprintf(fp, "Not implemented\n");
- } else if (eel == eelCUT) {
- lo_do_guillot(r,xi,xir,&vc,&fc,&vd,&fd,&vr,&fr);
- }
- fprintf(fp,"%15.10e %15.10e %15.10e %15.10e %15.10e %15.10e %15.10e\n",
- r,vc,fc,vd,fd,vr,fr);
-
- }
-}
-
-/* TODO:
- PvM: Everything is hardcoded, we should fix that. How?
-*/
-static void do_guillot2001a(const char *file,int eel,int pts_nm,double rc,double rtol,double xi,double xir)
-{
- FILE *fp=NULL;
- static char buf[256];
- static char *atype[] = { "HW", "OW", "HWd", "OWd", NULL };
- int i,j,k,i0,imax,atypemax=4;
- double r,vc,fc,vd,fd,vr,fr;
-
- /* For Guillot2001a we have four types: HW, OW, HWd and OWd. */
-
- for (j=0;(j<atypemax);j++) { /* loops over types */
- for (k=0; (k<=j); k++) {
- sprintf(buf,"table_%s_%s.xvg",atype[k],atype[j]);
-
- printf("%d %d %s\n", j, k, buf);
- /* Guillot2001a eqn 2, 6 and 7 */
- if (((strcmp(atype[j],"HW") == 0) && (strcmp(atype[k],"HW") == 0)) ||
- ((strcmp(atype[j],"OW") == 0) && (strcmp(atype[k],"HW") == 0)) ||
- ((strcmp(atype[j],"OW") == 0) && (strcmp(atype[k],"OW") == 0))) {
-
- fp = gmx_ffopen(buf,"w");
-
- imax = 3*pts_nm;
- for(i=0; (i<=imax); i++) {
- r = i*(1.0/pts_nm);
- /* Avoid very large numbers */
- if (r < 0.04) {
- vc = fc = vd = fd = vr = fr = 0;
- }
- else
- if (eel == eelPME || eel == eelRF) {
- fprintf(stderr, "Not implemented\n");
- exit(1);
- } else if (eel == eelCUT) {
- lo_do_GG_q_q(r,xi,xir,&vc,&fc,&vd,&fd,&vr,&fr);
- }
- fprintf(fp,"%15.10e %15.10e %15.10e %15.10e %15.10e %15.10e %15.10e\n",
- r,vc,fc,vd,fd,vr,fr);
-
- }
- gmx_ffclose(fp);
-
- /* Guillot eqn 4 and 5 */
- } else if (((strcmp(atype[j],"HWd") == 0) && (strcmp(atype[k],"HW") == 0)) ||
- ((strcmp(atype[j],"HWd") == 0) && (strcmp(atype[k],"OW") == 0)) ||
- ((strcmp(atype[j],"OWd") == 0) && (strcmp(atype[k],"HW") == 0)) ||
- ((strcmp(atype[j],"OWd") == 0) && (strcmp(atype[k],"OW") == 0))) {
-
- fp = gmx_ffopen(buf,"w");
-
- imax = 3*pts_nm;
- for(i=0; (i<=imax); i++) {
- r = i*(1.0/pts_nm);
- /* Avoid very large numbers */
- if (r < 0.04) {
- vc = fc = vd = fd = vr = fr = 0;
- }
- else
- if (eel == eelPME || eel == eelRF) {
- fprintf(stderr, "Not implemented\n");
- exit(1);
- } else if (eel == eelCUT) {
- lo_do_GG_q_qd(r,xi,xir,&vc,&fc,&vd,&fd,&vr,&fr);
- }
- fprintf(fp,"%15.10e %15.10e %15.10e %15.10e %15.10e %15.10e %15.10e\n",
- r,vc,fc,vd,fd,vr,fr);
-
- }
- gmx_ffclose(fp);
-
- /* Guillot2001a eqn 3 */
- } else if (((strcmp(atype[j],"HWd") == 0) && (strcmp(atype[k],"HWd") == 0)) ||
- ((strcmp(atype[j],"OWd") == 0) && (strcmp(atype[k],"HWd") == 0)) ||
- ((strcmp(atype[j],"OWd") == 0) && (strcmp(atype[k],"OWd") == 0))) {
-
- fp = gmx_ffopen(buf,"w");
-
- imax = 3*pts_nm;
- for(i=0; (i<=imax); i++) {
- r = i*(1.0/pts_nm);
- /* Avoid very large numbers */
- if (r < 0.04) {
- vc = fc = vd = fd = vr = fr = 0;
- }
- else
- if (eel == eelPME || eel == eelRF) {
- fprintf(stderr, "Not implemented\n");
- exit(1);
- } else if (eel == eelCUT) {
- lo_do_GG_qd_qd(r,xi,xir,&vc,&fc,&vd,&fd,&vr,&fr);
- }
- fprintf(fp,"%15.10e %15.10e %15.10e %15.10e %15.10e %15.10e %15.10e\n",
- r,vc,fc,vd,fd,vr,fr);
-
- }
- gmx_ffclose(fp);
-
- } else
- gmx_fatal(FARGS,"Invalid atom type: %s %s", atype[j], atype[k]);
-
-
- }
- }
-}
-
-static void do_ljc(FILE *fp,int eel,int pts_nm,real rc,real rtol)
-{
- int i,i0,imax;
- double r,vc,fc,vd,fd,vr,fr;
-
- imax = 3*pts_nm;
- for(i=0; (i<=imax); i++) {
- r = i*(1.0/pts_nm);
- /* Avoid very large numbers */
- if (r < 0.04) {
- vc = fc = vd = fd = vr = fr = 0;
- } else {
- if (eel == eelPME) {
- lo_do_ljc_pme(r,rc,rtol,&vc,&fc,&vd,&fd,&vr,&fr);
- } else if (eel == eelCUT) {
- lo_do_ljc(r,&vc,&fc,&vd,&fd,&vr,&fr);
- }
- }
- fprintf(fp,"%15.10e %15.10e %15.10e %15.10e %15.10e %15.10e %15.10e\n",
- r,vc,fc,vd,fd,vr,fr);
- }
-}
-
-static void do_guillot_maple(FILE *fp,int eel,int pts_nm,double rc,double rtol,double xi,double xir)
-{
- int i,i0,imax;
- /* double xi = 0.15;*/
- double r,vc,vc2,vd,vd2,vr,vr2;
-
- imax = 3*pts_nm;
- for(i=0; (i<=imax); i++) {
- r = i*(1.0/pts_nm);
- /* Avoid very large numbers */
- if (r < 0.04) {
- vc = vc2 = vd = vd2 = vr = vr2 = 0;
- }
- else
- if (eel == eelPME) {
- fprintf(fp, "Not implemented\n");
- } else if (eel == eelCUT) {
- lo_do_guillot_maple(r,xi,xir,&vc,&vc2,&vd,&vd2,&vr,&vr2);
- }
- fprintf(fp,"%12.5e %12.5e %12.5e %12.5e %12.5e %12.5e %12.5e\n",
- r,vc,vc2,vd,vd2,vr,vr2);
- }
-}
-
-static void do_GG(FILE *fp,int eel,int pts_nm,double rc,double rtol,double xi,double xir)
-{
- int i,i0,imax;
- double r,vc,vc2,vd,vd2,vr,vr2;
-
- imax = 3*pts_nm;
- for(i=0; (i<=imax); i++) {
- r = i*(1.0/pts_nm);
- /* Avoid very large numbers */
- if (r < 0.04) {
- vc = vc2 = vd = vd2 = vr = vr2 = 0;
- }
- else
- if (eel == eelPME) {
- fprintf(fp, "Not implemented\n");
- } else if (eel == eelCUT) {
- lo_do_GG(r,xi,xir,&vc,&vc2,&vd,&vd2,&vr,&vr2);
- }
- fprintf(fp,"%15.10e %15.10e %15.10e %15.10e %15.10e %15.10e %15.10e\n",
- r,vc,vc2,vd,vd2,vr,vr2);
- }
-}
-
-static void do_GG_q_q(FILE *fp,int eel,int pts_nm,double rc,double rtol,double xi,double xir)
-{
- int i,i0,imax;
- double r,vc,vc2,vd,vd2,vr,vr2;
-
- imax = 3*pts_nm;
- for(i=0; (i<=imax); i++) {
- r = i*(1.0/pts_nm);
- /* Avoid very large numbers */
- if (r < 0.04) {
- vc = vc2 = vd = vd2 = vr = vr2 = 0;
- }
- else
- if (eel == eelPME) {
- fprintf(fp, "Not implemented\n");
- } else if (eel == eelCUT) {
- lo_do_GG_q_q(r,xi,xir,&vc,&vc2,&vd,&vd2,&vr,&vr2);
- }
- fprintf(fp,"%12.5e %12.5e %12.5e %12.5e %12.5e %12.5e %12.5e\n",
- r,vc,vc2,vd,vd2,vr,vr2);
- }
-}
-
-static void do_GG_q_qd(FILE *fp,int eel,int pts_nm,double rc,double rtol,double xi,double xir)
-{
- int i,i0,imax;
- /* double xi = 0.15;*/
- double r,vc,vc2,vd,vd2,vr,vr2;
-
- imax = 3*pts_nm;
- for(i=0; (i<=imax); i++) {
- r = i*(1.0/pts_nm);
- /* Avoid very large numbers */
- if (r < 0.04) {
- vc = vc2 = vd = vd2 = vr = vr2 = 0;
- }
- else
- if (eel == eelPME) {
- fprintf(fp, "Not implemented\n");
- } else if (eel == eelCUT) {
- lo_do_GG_q_qd(r,xi,xir,&vc,&vc2,&vd,&vd2,&vr,&vr2);
- }
- fprintf(fp,"%12.5e %12.5e %12.5e %12.5e %12.5e %12.5e %12.5e\n",
- r,vc,vc2,vd,vd2,vr,vr2);
- }
-}
-
-static void do_GG_qd_qd(FILE *fp,int eel,int pts_nm,double rc,double rtol,double xi,double xir)
-{
- int i,i0,imax;
- /* double xi = 0.15;*/
- double r,vc,vc2,vd,vd2,vr,vr2;
-
- imax = 3*pts_nm;
- for(i=0; (i<=imax); i++) {
- r = i*(1.0/pts_nm);
- /* Avoid very large numbers */
- if (r < 0.04) {
- vc = vc2 = vd = vd2 = vr = vr2 = 0;
- }
- else
- if (eel == eelPME) {
- fprintf(fp, "Not implemented\n");
- } else if (eel == eelCUT) {
- lo_do_GG_qd_qd(r,xi,xir,&vc,&vc2,&vd,&vd2,&vr,&vr2);
- }
- fprintf(fp,"%12.5e %12.5e %12.5e %12.5e %12.5e %12.5e %12.5e\n",
- r,vc,vc2,vd,vd2,vr,vr2);
- }
-}
-
-static void do_maaren(FILE *fp,int eel,int pts_nm,int npow)
-{
- int i,i0,imax;
- double xi = 0.05;
- double xir = 0.0615;
- double r,vc,vc2,vd,vd2,vr,vr2;
-
- imax = 3*pts_nm;
- for(i=0; (i<=imax); i++) {
- r = i*(1.0/pts_nm);
- /* Avoid very large numbers */
- if (r < 0.04) {
- vc = vc2 = vd = vd2 = vr = vr2 = 0;
- }
- else {
- lo_do_guillot_maple(r,xi,xir,&vc,&vc2,&vd,&vd2,&vr,&vr2);
- vr = pow(r,-1.0*npow);
- vr2 = (npow+1.0)*(npow)*vr/sqr(r);
- }
- fprintf(fp,"%12.5e %12.5e %12.5e %12.5e %12.5e %12.5e %12.5e\n",
- r,vc,vc2,vd,vd2,vr,vr2);
- }
-}
-
-int main(int argc,char *argv[])
-{
- static char *desc[] = {
- "[TT]gen_table[tt] generates tables for [TT]mdrun[tt] for use with the USER defined",
- "potentials. Note that the format has been update for higher",
- "accuracy in the forces starting with version 4.0. Using older",
- "tables with 4.0 will silently crash your simulations, as will",
- "using new tables with an older GROMACS version. This is because in the",
- "old version the second derevative of the potential was specified",
- "whereas in the new version the first derivative of the potential",
- "is used instead.[PAR]"
- };
- static char *opt[] = { NULL, "cut", "rf", "pme", NULL };
- /* static char *model[] = { NULL, "guillot", "AB1", "ljc", "maaren", "guillot_maple", "hard_wall", "gg_q_q", "gg_qd_q", "gg_qd_qd", NULL }; */
- static char *model[] = { NULL, "ljc", "gg", "guillot2001a",
- NULL };
- static real delta=0,efac=500,rc=0.9,rtol=1e-05,xi=0.15,xir=0.0615;
- static real w1=20,w2=20;
- static int nrow1=1,nrow2=1;
- static int nrep = 12;
- static int ndisp = 6;
- static int pts_nm = 500;
- t_pargs pa[] = {
- { "-el", FALSE, etENUM, {opt},
- "Electrostatics type: cut, rf or pme" },
- { "-rc", FALSE, etREAL, {&rc},
- "Cut-off required for rf or pme" },
- { "-rtol", FALSE, etREAL, {&rtol},
- "Ewald tolerance required for pme" },
- { "-xi", FALSE, etREAL, {&xi},
- "Width of the Gaussian diffuse charge of the G&G model" },
- { "-xir", FALSE, etREAL, {&xir},
- "Width of erfc(z)/z repulsion of the G&G model (z=0.5 rOO/xir)" },
- { "-m", FALSE, etENUM, {model},
- "Model for the tables" },
- { "-resol", FALSE, etINT, {&pts_nm},
- "Resolution of the table (points per nm)" },
- { "-delta", FALSE, etREAL, {&delta},
- "Displacement in the Coulomb functions (nm), used as 1/(r+delta). Only for hard wall potential." },
- { "-efac", FALSE, etREAL, {&efac},
- "Number indicating the steepness of the hardwall potential." },
- { "-nrep", FALSE, etINT, {&nrep},
- "Power for the repulsion potential (with model AB1 or maaren)" },
- { "-ndisp", FALSE, etINT, {&ndisp},
- "Power for the dispersion potential (with model AB1 or maaren)" }
- };
-#define NPA asize(pa)
- t_filenm fnm[] = {
- { efXVG, "-o", "table", ffWRITE }
- };
-#define NFILE asize(fnm)
- FILE *fp;
- char *fn;
- int eel=0,m=0;
-
- CopyRight(stderr,argv[0]);
- parse_common_args(&argc,argv,PCA_CAN_VIEW | PCA_CAN_TIME,
- NFILE,fnm,NPA,pa,asize(desc),desc,0,NULL);
-
- if (strcmp(opt[0],"cut") == 0)
- eel = eelCUT;
- else if (strcmp(opt[0],"rf") == 0)
- eel = eelRF;
- else if (strcmp(opt[0],"pme") == 0)
- eel = eelPME;
- else
- gmx_fatal(FARGS,"Invalid argument %s for option -e",opt[0]);
- if (strcmp(model[0],"maaren") == 0)
- m = mMaaren;
- else if (strcmp(model[0],"AB1") == 0)
- m = mAB1;
- else if (strcmp(model[0],"ljc") == 0)
- m = mLjc;
- else if (strcmp(model[0],"guillot2001a") == 0)
- m = mGuillot2001a;
- else if (strcmp(model[0],"guillot_maple") == 0)
- m = mGuillot_Maple;
- else if (strcmp(model[0],"hard_wall") == 0)
- m = mHard_Wall;
- else if (strcmp(model[0],"gg") == 0)
- m = mGG;
- else if (strcmp(model[0],"gg_qd_q") == 0)
- m = mGG_qd_q;
- else if (strcmp(model[0],"gg_qd_qd") == 0)
- m = mGG_qd_qd;
- else if (strcmp(model[0],"gg_q_q") == 0)
- m = mGG_q_q;
- else
- gmx_fatal(FARGS,"Invalid argument %s for option -m",opt[0]);
-
- fn = opt2fn("-o",NFILE,fnm);
- if ((m != mGuillot2001a))
- fp = gmx_ffopen(fn,"w");
- switch (m) {
- case mGuillot2001a:
- do_guillot2001a(fn,eel,pts_nm,rc,rtol,xi,xir);
- break;
- case mGuillot_Maple:
- fprintf(fp, "#\n# Table Guillot_Maple: rc=%g, rtol=%g, xi=%g, xir=%g\n#\n",rc,rtol,xi,xir);
- do_guillot_maple(fp,eel,pts_nm,rc,rtol,xi,xir);
- break;
- case mGG_q_q:
- fprintf(fp, "#\n# Table GG_q_q: rc=%g, rtol=%g, xi=%g, xir=%g\n#\n",rc,rtol,xi,xir);
- do_GG_q_q(fp,eel,pts_nm,rc,rtol,xi,xir);
- break;
- case mGG:
- fprintf(fp, "#\n# Table GG: rc=%g, rtol=%g, xi=%g, xir=%g\n#\n",rc,rtol,xi,xir);
- do_GG(fp,eel,pts_nm,rc,rtol,xi,xir);
- break;
- case mGG_qd_q:
- fprintf(stdout, "case mGG_qd_q");
- fprintf(fp, "#\n# Table GG_qd_q: rc=%g, rtol=%g, xi=%g, xir=%g\n#\n",rc,rtol,xi,xir);
- do_GG_q_qd(fp,eel,pts_nm,rc,rtol,xi,xir);
- break;
- case mGG_qd_qd:
- fprintf(stdout, "case mGG_qd_qd");
- fprintf(fp, "#\n# Table GG_qd_qd: rc=%g, rtol=%g, xi=%g, xir=%g\n#\n",rc,rtol,xi,xir);
- do_GG_qd_qd(fp,eel,pts_nm,rc,rtol,xi,xir);
- break;
- case mMaaren:
- do_maaren(fp,eel,pts_nm,nrep);
- break;
- case mAB1:
- fprintf(fp, "#\n# Table AB1: ndisp=%d nrep=%d\n#\n",ndisp,nrep);
- do_AB1(fp,eel,pts_nm,ndisp,nrep);
- break;
- case mLjc:
- fprintf(fp, "#\n# Table LJC(12-6-1): rc=%g, rtol=%g\n#\n",rc,rtol);
- do_ljc(fp,eel,pts_nm,rc,rtol);
- break;
- case mHard_Wall:
- do_hard(fp,pts_nm,efac,delta);
- break;
- default:
- gmx_fatal(FARGS,"Model %s not supported yet",model[0]);
- }
- if ((m != mGuillot2001a))
- gmx_ffclose(fp);
-
- gmx_thanx(stdout);
-
- return 0;
-}
+++ /dev/null
-/*
- *
- * This source code is NOT part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * And Hey:
- * Gyas ROwers Mature At Cryogenic Speed
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <math.h>
-
-#include "typedefs.h"
-#include "macros.h"
-#include "gromacs/math/vec.h"
-#include "gromacs/pbcutil/pbc.h"
-#include "gromacs/pbcutil/rmpbc.h"
-#include "copyrite.h"
-#include "gromacs/utility/futil.h"
-#include "gromacs/commandline/pargs.h"
-#include "gromacs/fileio/tpxio.h"
-#include "gromacs/topology/index.h"
-#include "gromacs/utility/smalloc.h"
-#include "nrnb.h"
-#include "gstat.h"
-#include "gromacs/utility/fatalerror.h"
-
-
-#define G_REF1 0
-#define G_REF2 1
-#define G_REF3 2
-#define G_SDF 3
-#define NDX_REF1 4
-#define NDX_REF2 5
-#define NDX_REF3 6
-#define G_REFMOL 7
-
-static void i_write(FILE *output, int value)
-{
- if(fwrite(&value,sizeof(int),1,output) != 1)
- {
- gmx_fatal(FARGS,"Error writing to output file");
- }
-}
-
-
-static void f_write(FILE *output,float value)
-{
- if(fwrite(&value,sizeof(float),1,output) != 1)
- {
- gmx_fatal(FARGS,"Error writing to output file");
- }
-}
-
-
-static void do_sdf(const char *fnNDX,const char *fnTPS,const char *fnTRX,
- const char *fnSDF, const char *fnREF, gmx_bool bRef,
- rvec cutoff, real binwidth, int mode, rvec triangle,
- rvec dtri, const output_env_t oenv)
-{
- FILE *fp;
- t_trxstatus *status;
- int ng,natoms,i,j,k,l,X,Y,Z,lc,dest;
- ivec nbin;
- int ***count;
- /* real ***sdf; */
- real sdf,min_sdf=1e10,max_sdf=0;
- char **grpname;
- int *isize;
- int isize_cg=0;
- int isize_ref=3;
- int ref_resind[3]={0};
- int nrefmol=0,refc=0;
- atom_id **index;
- atom_id *index_cg=NULL;
- atom_id *index_ref=NULL;
- real t,boxmin,hbox,normfac;
- real invbinw;
- rvec tri_upper,tri_lower;
- rvec *x,xcog,dx,*x_i1,xi,*x_refmol;
- matrix box;
- matrix rot; /* rotation matrix := unit vectors for the molecule frame */
- rvec k_mol,i1_mol,i2_mol,dx_mol;
- real delta;
- atom_id ix,jx;
- t_topology top;
- gmx_rmpbc_t gpbc=NULL;
- int ePBC=-1;
- t_pbc pbc;
- gmx_bool bTop=FALSE,bRefDone=FALSE,bInGroup=FALSE;
- char title[STRLEN];
-
-
- /* Read Topology */
- if (fnTPS) {
- bTop=read_tps_conf(fnTPS,title,&top,&ePBC,&x,NULL,box,TRUE);
- }
-
-
-
- if ( !bTop ) {
- fprintf(stderr,"\nNeed tpr-file to make a reference structure.\n");
- fprintf(stderr,"Option -r will be ignored!\n");
- bRef = FALSE;
- }
-
-
- /* Allocate memory for 4 groups, 3 dummy groups and a group for the ref
-structure if needed */
- ng = 4;
- snew(grpname,ng);
- /* the dummy groups are used to dynamically store triples of atoms */
- /* for molecular coordinate systems */
- if ( bRef )
- {
- snew(isize,ng+4);
- snew(index,ng+4);
- }
- else
- {
- snew(isize,ng+3);
- snew(index,ng+3);
- }
-
-
- /* Read the index groups */
- fprintf(stderr,"\nSelect the 3 reference groups and the SDF group:\n");
- if (fnTPS)
- get_index(&top.atoms,fnNDX,ng,isize,index,grpname);
- else
- rd_index(fnNDX,ng,isize,index,grpname);
-
-
- isize[NDX_REF1]=isize[G_REF1];
- for (i=NDX_REF1; i<=NDX_REF3; i++)
- snew(index[i],isize[NDX_REF1]);
-
-
- /* Read first frame and check it */
- natoms=read_first_x(oenv,&status,fnTRX,&t,&x,box);
- if ( !natoms )
- gmx_fatal(FARGS,"Could not read coordinates from statusfile!\n");
-
-
- /* check with topology */
- if (fnTPS)
- if ( natoms > top.atoms.nr )
- gmx_fatal(FARGS,
- "Trajectory (%d atoms) does not match topology (%d atoms)!\n",
- natoms,top.atoms.nr);
-
-
- /* check with index groups */
- for (i=0; i<ng; i++)
- for (j=0; j<isize[i]; j++)
- if ( index[i][j] >= natoms )
- gmx_fatal(FARGS,"Atom index (%d) in index group %s (%d atoms) larger "
- "than number of atoms in trajectory (%d atoms)!\n",
- index[i][j],grpname[i],isize[i],natoms);
-
-
- /* check reference groups */
- if ( mode == 1 )
- {
- if ( isize[G_REF1] != isize[G_REF2] || isize[G_REF1] != isize[G_REF3] ||
- isize[G_REF2] != isize[G_REF3] )
- gmx_fatal(FARGS,"For single particle SDF, all reference groups"
- "must have the same size.\n");
-
-
- /* for single particle SDF dynamic triples are not needed */
- /* so we build them right here */
-
-
- /* copy all triples from G_REFx to NDX_REFx */
- for (i=0; i<isize[G_REF1]; i++)
- {
- /* check if all three atoms come from the same molecule */
- for (j=G_REF1; j<=G_REF3; j++)
- ref_resind[j] = top.atoms.atom[index[j][i]].resind;
-
-
- if ( ref_resind[G_REF1] != ref_resind[G_REF2] ||
- ref_resind[G_REF2] != ref_resind[G_REF3] ||
- ref_resind[G_REF3] != ref_resind[G_REF1] )
- {
- fprintf(stderr,"\nWarning: reference triple (%d) will be skipped.\n",i);
- fprintf(stderr, " resnr[1]: %d, resnr[2]: %d, resnr[3]: %d\n",
- ref_resind[G_REF1],ref_resind[G_REF2], ref_resind[G_REF3]);
- isize[NDX_REF1]--;
- for (j=NDX_REF1; j<=NDX_REF3; j++)
- srenew(index[j],isize[NDX_REF1]);
- continue;
- }
- else
- /* check if all entries are unique*/
- if ( index[G_REF1][i] == index[G_REF2][i] ||
- index[G_REF2][i] == index[G_REF3][i] ||
- index[G_REF3][i] == index[G_REF1][i] )
- {
- fprintf(stderr,"Warning: reference triple (%d) will be skipped.\n",i);
- fprintf(stderr, " index[1]: %d, index[2]: %d, index[3]: %d\n",
- index[G_REF1][i],index[G_REF2][i],index[G_REF3][i]);
- isize[NDX_REF1]--;
- for (j=NDX_REF1; j<=NDX_REF3; j++)
- srenew(index[j],isize[NDX_REF1]);
- continue;
- }
- else /* everythings fine, copy that one */
- for (j=G_REF1; j<=G_REF3; j++)
- index[j+4][i] = index[j][i];
- }
- }
- else if ( mode == 2 )
- {
- if ( isize[G_REF1] != isize[G_REF2] )
- gmx_fatal(FARGS,"For two particle SDF, reference groups 1 and 2"
- "must have the same size.\n");
-
-
- for (i=0; i<isize[G_REF1]; i++)
- {
- /* check consistency for atoms 1 and 2 */
- for (j=G_REF1; j<=G_REF2; j++)
- ref_resind[j] = top.atoms.atom[index[j][i]].resind;
-
-
- if ( ref_resind[G_REF1] != ref_resind[G_REF2] ||
- index[G_REF1][i] == index[G_REF2][i] )
- {
- if ( ref_resind[G_REF1] != ref_resind[G_REF2] )
- {
- fprintf(stderr,"\nWarning: bond (%d) not from one molecule."
- "Will not be used for SDF.\n",i);
- fprintf(stderr, " resnr[1]: %d, resnr[2]: %d\n",
- ref_resind[G_REF1],ref_resind[G_REF2]);
- }
- else
- {
- fprintf(stderr,"\nWarning: atom1 and atom2 are identical."
- "Bond (%d) will not be used for SDF.\n",i);
- fprintf(stderr, " index[1]: %d, index[2]: %d\n",
- index[G_REF1][i],index[G_REF2][i]);
- }
- for (j=NDX_REF1; j<=NDX_REF2; j++)
- {
- for (k=i; k<isize[G_REF1]-1; k++)
- index[j][k]=index[j][k+1];
- isize[j]--;
- srenew(index[j],isize[j]);
- }
- }
- }
- }
-
-
- /* Read Atoms for refmol group */
- if ( bRef )
- {
- snew(index[G_REFMOL],1);
-
-
- for (i=G_REF1; i<=G_REF3; i++)
- ref_resind[i] = top.atoms.atom[index[i][0]].resind;
-
-
- for (i=0; i<natoms; i++)
- {
- if ( ref_resind[G_REF1] == top.atoms.atom[i].resind ||
- ref_resind[G_REF2] == top.atoms.atom[i].resind ||
- ref_resind[G_REF3] == top.atoms.atom[i].resind )
- nrefmol++;
- }
- srenew(index[G_REFMOL],nrefmol);
- isize[G_REFMOL] = nrefmol;
- nrefmol = 0;
-
-
- for (i=0; i<natoms; i++)
- {
- if ( ref_resind[G_REF1] == top.atoms.atom[i].resind ||
- ref_resind[G_REF2] == top.atoms.atom[i].resind ||
- ref_resind[G_REF3] == top.atoms.atom[i].resind )
- {
- index[G_REFMOL][nrefmol] = i;
- nrefmol++;
- }
- }
- }
-
-
- /* initialize some stuff */
- boxmin = min( norm(box[XX]), min( norm(box[YY]), norm(box[ZZ]) ) );
- hbox = boxmin / 2.0;
-
-
- for (i=0; i<DIM; i++)
- {
- cutoff[i] = cutoff[i] / 2;
- nbin[i] = (int)(2 * cutoff[i] / binwidth) + 1;
- invbinw = 1.0 / binwidth;
- tri_upper[i] = triangle[i] + dtri[i];
- tri_upper[i] = sqr(tri_upper[i]);
- tri_lower[i] = triangle[i] - dtri[i];
- tri_lower[i] = sqr(tri_lower[i]);
- }
-
-
- /* Allocate the array's for sdf */
- snew(count,nbin[0]+1);
- for(i=0; i<nbin[0]+1; i++)
- {
- snew(count[i],nbin[1]+1);
- for (j=0; j<nbin[1]+1; j++)
- snew(count[i][j],nbin[2]+1);
- }
-
-
- /* Allocate space for the coordinates */
- snew(x_i1,isize[G_SDF]);
- snew(x_refmol,isize[G_REFMOL]);
- for (i=0; i<isize[G_REFMOL]; i++)
- for (j=XX; j<=ZZ; j++)
- x_refmol[i][j] = 0;
-
-
- normfac = 0;
-
- gpbc = gmx_rmpbc_init(&top.idef,ePBC,natoms,box);
-
- do {
- /* Must init pbc every step because of pressure coupling */
- set_pbc(&pbc,ePBC,box);
- gmx_rmpbc(gpbc,natoms,box,x);
-
- /* Dynamically build the ref triples */
- if ( mode == 2 )
- {
- isize[NDX_REF1]=0;
- for (j=NDX_REF1; j<=NDX_REF3; j++)
- srenew(index[j],isize[NDX_REF1]+1);
-
-
- /* consistancy of G_REF[1,2] has already been check */
- /* hence we can look for the third atom right away */
-
-
- for (i=0; i<isize[G_REF1]; i++)
- {
- for (j=0; j<isize[G_REF3]; j++)
- {
- /* Avoid expensive stuff if possible */
- if ( top.atoms.atom[index[G_REF1][i]].resind !=
- top.atoms.atom[index[G_REF3][j]].resind &&
- index[G_REF1][i] != index[G_REF3][j] &&
- index[G_REF2][i] != index[G_REF3][j] )
- {
- pbc_dx(&pbc,x[index[G_REF1][i]],x[index[G_REF3][j]],dx);
- delta = norm2(dx);
- if ( delta < tri_upper[G_REF1] &&
- delta > tri_lower[G_REF1] )
- {
- pbc_dx(&pbc,x[index[G_REF2][i]],x[index[G_REF3][j]],dx);
- delta = norm2(dx);
- if ( delta < tri_upper[G_REF2] &&
- delta > tri_lower[G_REF2] )
- {
- /* found triple */
- index[NDX_REF1][isize[NDX_REF1]]=index[G_REF1][i];
- index[NDX_REF2][isize[NDX_REF1]]=index[G_REF2][i];
- index[NDX_REF3][isize[NDX_REF1]]=index[G_REF3][j];
-
-
- /* resize groups */
- isize[NDX_REF1]++;
- for (k=NDX_REF1; k<=NDX_REF3; k++)
- srenew(index[k],isize[NDX_REF1]+1);
- }
- }
- }
- }
- }
- }
- else if ( mode ==3 )
- {
- isize[NDX_REF1]=0;
- for (j=NDX_REF1; j<=NDX_REF3; j++)
- srenew(index[j],isize[NDX_REF1]+1);
-
- /* consistancy will be checked while searching */
-
-
- for (i=0; i<isize[G_REF1]; i++)
- {
- for (j=0; j<isize[G_REF2]; j++)
- {
- /* Avoid expensive stuff if possible */
- if ( top.atoms.atom[index[G_REF1][i]].resind !=
- top.atoms.atom[index[G_REF2][j]].resind &&
- index[G_REF1][i] != index[G_REF2][j] )
- {
- pbc_dx(&pbc,x[index[G_REF1][i]],x[index[G_REF2][j]],dx);
- delta = norm2(dx);
- if ( delta < tri_upper[G_REF3] &&
- delta > tri_lower[G_REF3] )
- {
- for (k=0; k<isize[G_REF3]; k++)
- {
- if ( top.atoms.atom[index[G_REF1][i]].resind !=
- top.atoms.atom[index[G_REF3][k]].resind &&
- top.atoms.atom[index[G_REF2][j]].resind !=
- top.atoms.atom[index[G_REF3][k]].resind &&
- index[G_REF1][i] != index[G_REF3][k] &&
- index[G_REF2][j] != index[G_REF3][k])
- {
- pbc_dx(&pbc,x[index[G_REF1][i]],x[index[G_REF3][k]],dx);
- delta = norm2(dx);
- if ( delta < tri_upper[G_REF1] &&
- delta > tri_lower[G_REF1] )
- {
- pbc_dx(&pbc,x[index[G_REF2][j]],x[index[G_REF3][k]],dx);
- delta = norm2(dx);
- if ( delta < tri_upper[G_REF2] &&
- delta > tri_lower[G_REF2] )
- {
- /* found triple */
- index[NDX_REF1][isize[NDX_REF1]]=index[G_REF1][i];
- index[NDX_REF2][isize[NDX_REF1]]=index[G_REF2][j];
- index[NDX_REF3][isize[NDX_REF1]]=index[G_REF3][k];
-
- /* resize groups */
- isize[NDX_REF1]++;
- for (l=NDX_REF1; l<=NDX_REF3; l++)
- srenew(index[l],isize[NDX_REF1]+1);
- }
- }
- }
- }
- }
- }
- }
- }
- }
-
- for (i=0; i<isize[NDX_REF1]; i++)
- {
- /* setup the molecular coordinate system (i',j',k') */
- /* because the coodinate system of the box forms a unit matrix */
- /* (i',j',k') is identical with the rotation matrix */
- clear_mat(rot);
-
-
- /* k' = unitv(r(atom0) - r(atom1)) */
- pbc_dx(&pbc,x[index[NDX_REF1][i]],x[index[NDX_REF2][i]],k_mol);
- unitv(k_mol,rot[2]);
-
- /* i' = unitv(k' x (r(atom2) - r(atom1))) */
- pbc_dx(&pbc,x[index[NDX_REF3][i]],x[index[NDX_REF2][i]],i1_mol);
- cprod(i1_mol,rot[2],i2_mol);
- unitv(i2_mol,rot[0]);
-
- /* j' = k' x i' */
- cprod(rot[2],rot[0],rot[1]);
-
-
- /* set the point of reference */
- if ( mode == 2 )
- copy_rvec(x[index[NDX_REF3][i]],xi);
- else
- copy_rvec(x[index[NDX_REF1][i]],xi);
-
-
- /* make the reference */
- if ( bRef )
- {
- for (j=0; j<isize[G_REFMOL]; j++)
- {
- pbc_dx(&pbc,xi,x[index[G_REFMOL][j]],dx);
- mvmul(rot,dx,dx_mol);
- rvec_inc(x_refmol[j],dx_mol);
- for(k=XX; k<=ZZ; k++)
- x_refmol[j][k] = x_refmol[j][k] / 2;
- }
- }
-
-
- /* Copy the indexed coordinates to a continuous array */
- for(j=0; j<isize[G_SDF]; j++)
- copy_rvec(x[index[G_SDF][j]],x_i1[j]);
-
- /* count the SDF */
- for(j=0; j<isize[G_SDF]; j++)
- {
- /* Exclude peaks from the reference set */
- bInGroup=FALSE;
- for (k=NDX_REF1; k<=NDX_REF3; k++)
- if ( index[G_SDF][j] == index[k][i] )
- bInGroup=TRUE;
-
-
- if ( !bInGroup )
- {
- pbc_dx(&pbc,xi,x_i1[j],dx);
-
- /* transfer dx to the molecular coordinate system */
- mvmul(rot,dx,dx_mol);
-
-
- /* check cutoff's and count */
- if ( dx_mol[XX] > -cutoff[XX] && dx_mol[XX] < cutoff[XX] )
- if ( dx_mol[YY] > -cutoff[YY] && dx_mol[YY] < cutoff[YY] )
- if ( dx_mol[ZZ] > -cutoff[ZZ] && dx_mol[ZZ] < cutoff[ZZ] )
- {
- X = (int)(floor(dx_mol[XX]*invbinw)) + (nbin[XX]-1)/2
-+1;
- Y = (int)(floor(dx_mol[YY]*invbinw)) + (nbin[YY]-1)/2
-+1;
- Z = (int)(floor(dx_mol[ZZ]*invbinw)) + (nbin[ZZ]-1)/2
-+1;
- count[X][Y][Z]++;
- normfac++;
- }
- }
- }
- }
- } while (read_next_x(oenv,status,&t,natoms,x,box));
- fprintf(stderr,"\n");
-
- gmx_rmpbc_done(gpbc);
-
-
- close_trx(status);
-
- sfree(x);
-
-
- /* write the reference strcture*/
- if ( bRef )
- {
- fp=gmx_ffopen(fnREF,"w");
- fprintf(fp,"%s\n",title);
- fprintf(fp," %d\n",isize[G_REFMOL]);
-
-
- for (i=0; i<isize[G_REFMOL]; i++)
- fprintf(fp,"%5d%5s%5s%5d%8.3f%8.3f%8.3f\n",
- top.atoms.resinfo[top.atoms.atom[index[G_REFMOL][i]].resind].nr,
- *(top.atoms.resinfo[top.atoms.atom[index[G_REFMOL][i]].resind].name),
- *(top.atoms.atomname[index[G_REFMOL][i]]),i+1,
- -1*x_refmol[i][XX],-1*x_refmol[i][YY],-1*x_refmol[i][ZZ]);
- /* Inserted -1* on the line above three times */
- fprintf(fp," 10.00000 10.00000 10.00000\n");
- gmx_ffclose(fp);
- fprintf(stderr,"\nWrote reference structure. (%d Atoms)\n",isize[G_REFMOL]);
- }
-
-
- /* Calculate the mean probability density */
- fprintf(stderr,"\nNumber of configurations used for SDF: %d\n",(int)normfac);
-
-
- normfac = nbin[0]*nbin[1]*nbin[2] / normfac;
-
-
- fprintf(stderr,"\nMean probability density: %f\n",1/normfac);
-
-
- /* normalize the SDF and write output */
- /* see http://www.csc.fi/gopenmol/index.phtml for documentation */
- fp=gmx_ffopen(fnSDF,"wb");
-
-
- /* rank */
- i_write(fp,3);
-
-
- /* Type of surface */
- i_write(fp,42);
-
-
- /* Zdim, Ydim, Xdim */
- for (i=ZZ; i>=XX; i--)
- i_write(fp,nbin[i]);
-
-
- /* [Z,Y,X][min,max] (box corners in Angstroem)*/
- for (i=ZZ; i>=XX; i--)
- {
- f_write(fp,-cutoff[i]*10);
- f_write(fp,cutoff[i]*10);
- }
-
-
-/* Original Code
- for (i=1; i<nbin[2]+1; i++)
- for (j=1; j<nbin[1]+1; j++)
- for (k=1; k<nbin[0]+1; k++)
- {
- sdf = normfac * count[k][j][i];
- if ( sdf < min_sdf ) min_sdf = sdf;
- if ( sdf > max_sdf ) max_sdf = sdf;
- f_write(fp,sdf);
- }*/
-/* Changed Code to Mirror SDF to correct coordinates */
- for (i=nbin[2]; i>0; i--)
- for (j=nbin[1]; j>0; j--)
- for (k=nbin[0]; k>0; k--)
- {
- sdf = normfac * count[k][j][i];
- if ( sdf < min_sdf ) min_sdf = sdf;
- if ( sdf > max_sdf ) max_sdf = sdf;
- f_write(fp,sdf);
- }
-
- fprintf(stderr,"\nMin: %f Max: %f\n",min_sdf,max_sdf);
-
-
- gmx_ffclose(fp);
-
-
- /* Give back the mem */
- for(i=0; i<nbin[0]+1; i++)
- {
- for (j=0; j<nbin[1]+1; j++)
- {
- sfree(count[i][j]);
- }
- sfree(count[i]);
- }
- sfree(count);
-}
-
-int gmx_sdf(int argc,char *argv[])
-{
- const char *desc[] = {
- "[TT]g_sdf[tt] calculates the spatial distribution function (SDF) of a set of atoms",
- "within a coordinate system defined by three atoms. There is single body, ",
- "two body and three body SDF implemented (select with option [TT]-mode[tt]). ",
- "In the single body case the local coordinate system is defined by using",
- "a triple of atoms from one single molecule, for the two and three body case",
- "the configurations are dynamically searched complexes of two or three",
- "molecules (or residues) meeting certain distance consitions (see below).[PAR]",
- "The program needs a trajectory, a GROMACS run input file and an index ",
- "file to work. ",
- "You have to setup 4 groups in the index file before using g_sdf: [PAR]",
- "The first three groups are used to define the SDF coordinate system.",
- "The program will dynamically generate the atom triples according to ",
- "the selected [TT]-mode[tt]: ",
- "In [TT]-mode[tt] 1 the triples will be just the 1st, 2nd, 3rd, ... atoms from ",
- "groups 1, 2 and 3. Hence the nth entries in groups 1, 2 and 3 must be from the",
- "same residue. In [TT]-mode[tt] 2 the triples will be 1st, 2nd, 3rd, ... atoms from",
- "groups 1 and 2 (with the nth entries in groups 1 and 2 having the same res-id).",
- "For each pair from groups 1 and 2 group 3 is searched for an atom meeting the",
- "distance conditions set with [TT]-triangle[tt] and [TT]-dtri[tt] relative to atoms 1 and 2. In",
- "[TT]-mode[tt] 3 for each atom in group 1 group 2 is searched for an atom meeting the",
- "distance condition and if a pair is found group 3 is searched for an atom",
- "meeting the further conditions. The triple will only be used if all three atoms",
- "have different res-id's.[PAR]",
- "The local coordinate system is always defined using the following scheme:",
- "Atom 1 will be used as the point of origin for the SDF. ",
- "Atom 1 and 2 will define the principle axis (Z) of the coordinate system.",
- "The other two axis will be defined inplane (Y) and normal (X) to the plane through",
- "Atoms 1, 2 and 3. ",
- "The fourth group",
- "contains the atoms for which the SDF will be evaluated.[PAR]",
- "For [TT]-mode[tt] 2 and 3 you have to define the distance conditions for the ",
- "2 resp. 3 molecule complexes to be searched for using [TT]-triangle[tt] and [TT]-dtri[tt].[PAR]",
- "The SDF will be sampled in cartesian coordinates.",
- "Use [TT]-grid x y z[tt] to define the size of the SDF grid around the ",
- "reference molecule. ",
- "The Volume of the SDF grid will be V=x*y*z (nm^3). ",
- "Use [TT]-bin[tt] to set the binwidth for grid.[PAR]",
- "The output will be a binary 3D-grid file ([TT]gom_plt.dat[tt]) in the [REF].plt[ref] format that can be be",
- "read directly by gOpenMol. ",
- "The option [TT]-r[tt] will generate a [REF].gro[ref] file with the reference molecule(s) transferred to",
- "the SDF coordinate system. Load this file into gOpenMol and display the",
- "SDF as a contour plot (see http://www.csc.fi/gopenmol/index.phtml for ",
- "further documentation). [PAR]",
- "For further information about SDF's have a look at: A. Vishnyakov, JPC A, 105,",
- "2001, 1702 and the references cited within."
- };
- output_env_t oenv;
- static gmx_bool bRef=FALSE;
- static int mode=1;
- static rvec triangle={0.0,0.0,0.0};
- static rvec dtri={0.03,0.03,0.03};
- static rvec cutoff={1,1,1};
- static real binwidth=0.05;
- t_pargs pa[] = {
- { "-mode", FALSE, etINT, {&mode},
- "SDF in [1,2,3] particle mode"},
- { "-triangle", FALSE, etRVEC, {&triangle},
- "r(1,3), r(2,3), r(1,2)"},
- { "-dtri", FALSE, etRVEC, {&dtri},
- "dr(1,3), dr(2,3), dr(1,2)"},
- { "-bin", FALSE, etREAL, {&binwidth},
- "Binwidth for the 3D-grid (nm)" },
- { "-grid", FALSE, etRVEC, {&cutoff},
- "Size of the 3D-grid (nm,nm,nm)"}
- };
-#define NPA asize(pa)
- const char *fnTPS,*fnNDX,*fnREF;
-
- t_filenm fnm[] = {
- { efTRX, "-f", NULL, ffREAD },
- { efNDX, NULL, NULL, ffREAD },
- { efTPS, NULL, NULL, ffOPTRD },
- { efDAT, "-o", "gom_plt", ffWRITE },
- { efSTO, "-r", "refmol", ffOPTWR },
- };
-#define NFILE asize(fnm)
-
- CopyRight(stderr,argv[0]);
- parse_common_args(&argc,argv,PCA_CAN_TIME,
- NFILE,fnm,NPA,pa,asize(desc),desc,0,NULL,&oenv);
-
-
- fnTPS = ftp2fn_null(efTPS,NFILE,fnm);
- fnNDX = ftp2fn_null(efNDX,NFILE,fnm);
- fnREF = opt2fn_null("-r",NFILE,fnm);
- bRef = opt2bSet("-r",NFILE,fnm);
-
-
-
- if (!fnNDX)
- gmx_fatal(FARGS,"No index file specified\n"
- " Nothing to do!");
-
-
- if (!fnTPS)
- gmx_fatal(FARGS,"No topology file specified\n"
- " Nothing to do!");
-
-
- if ( bRef && (fn2ftp(fnREF) != efGRO))
- {
- fprintf(stderr,"\nOnly GROMACS format is supported for reference structures.\n");
- fprintf(stderr,"Option -r will be ignored!\n");
- bRef = FALSE;
- }
-
-
- if ((mode < 1) || (mode > 3))
- gmx_fatal(FARGS,"Wrong -mode selection. Chose 1-, 2- oder 3-particle mode.\n");
-
-
- do_sdf(fnNDX,fnTPS,ftp2fn(efTRX,NFILE,fnm),opt2fn("-o",NFILE,fnm),
- fnREF,bRef,cutoff,binwidth,mode,triangle,dtri,oenv);
-
-
- gmx_thanx(stderr);
-
- return 0;
-}
-
-int
-main(int argc, char *argv[])
-{
- gmx_sdf(argc,argv);
- return 0;
-}
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.3.99_development_20071104
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2006, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Groningen Machine for Chemical Simulation
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <math.h>
-#include <string.h>
-
-#include "gromacs/fileio/pdbio.h"
-#include "gromacs/fileio/confio.h"
-#include "gromacs/utility/smalloc.h"
-#include "gromacs/topology/symtab.h"
-#include "macros.h"
-#include "copyrite.h"
-#include "gromacs/commandline/pargs.h"
-#include "gromacs/math/vec.h"
-#include "typedefs.h"
-#include "gbutil.h"
-#include "gromacs/math/units.h"
-
-void copy_atom(t_symtab *tab,t_atoms *a1,int i1,t_atoms *a2,int i2,
- rvec xin[],rvec xout[],rvec vin[],rvec vout[])
-{
- a2->atom[i2] = a1->atom[i1];
- a2->atomname[i2] = put_symtab(tab,*a1->atomname[i1]);
- a2->resname[a2->atom[i2].resnr] =
- put_symtab(tab,*a1->resname[a1->atom[i1].resnr]);
- copy_rvec(xin[i1],xout[i2]);
- copy_rvec(vin[i1],vout[i2]);
-}
-
-static void rotate_x(int natom,rvec xin[],real angle,rvec xout[],
- gmx_bool bZ,gmx_bool bUpsideDown,real dz)
-{
- int i;
- matrix mat;
-
- angle *= DEG2RAD;
- clear_mat(mat);
- if (bZ) {
- mat[XX][XX] = cos(angle);
- mat[XX][YY] = sin(angle);
- mat[YY][XX] = -sin(angle);
- mat[YY][YY] = cos(angle);
- mat[ZZ][ZZ] = 1;
- }
- else {
- mat[XX][XX] = 1;
- mat[YY][YY] = cos(angle);
- mat[YY][ZZ] = sin(angle);
- mat[ZZ][YY] = -sin(angle);
- mat[ZZ][ZZ] = cos(angle);
- }
-
- for(i=0; (i<natom); i++) {
- mvmul(mat,xin[i],xout[i]);
- if (bUpsideDown)
- xout[i][ZZ] *= -1;
- xout[i][ZZ] += dz;
- }
-}
-
-static void prep_x(int natom,rvec x[],real rDist,real rAngleZ,real rAngleX)
-{
- int i;
- rvec xcm;
- rvec *xx;
-
- /* Center on Z-axis */
- clear_rvec(xcm);
- for(i=0; (i<natom); i++) {
- xcm[XX] += x[i][XX];
- xcm[YY] += x[i][YY];
- xcm[ZZ] += x[i][ZZ];
- }
- xcm[XX] /= natom;
- xcm[YY] /= natom;
- xcm[ZZ] /= natom;
- for(i=0; (i<natom); i++) {
- x[i][XX] -= xcm[XX];
- x[i][YY] -= xcm[YY];
- x[i][ZZ] -= xcm[ZZ];
- }
- if (rAngleZ != 0) {
- snew(xx,natom);
- rotate_x(natom,x,rAngleZ,xx,TRUE,FALSE,0);
- for(i=0; (i<natom); i++)
- copy_rvec(xx[i],x[i]);
- sfree(xx);
- }
- if (rAngleX != 0) {
- snew(xx,natom);
- rotate_x(natom,x,rAngleX,xx,FALSE,FALSE,0);
- for(i=0; (i<natom); i++)
- copy_rvec(xx[i],x[i]);
- sfree(xx);
- }
- if (rDist > 0) {
- for(i=0; (i<natom); i++)
- x[i][XX] += rDist;
- }
-}
-
-int main(int argc, char *argv[])
-{
- t_symtab tab;
- static char *desc[] = {
- "[TT]hexamer[tt] takes a single input coordinate file and makes five symmetry",
- "related copies."
- };
-#define NPA asize(pa)
- t_filenm fnm[] = {
- { efSTX, "-f", NULL, ffREAD },
- { efPDB, "-o", NULL, ffWRITE }
- };
-#define NFILE asize(fnm)
- gmx_bool bCenter = FALSE;
- gmx_bool bTrimer = FALSE;
- gmx_bool bAlternate = FALSE;
- real rDist = 0,rAngleZ = 0,rAngleX = 0, alterz = 0;
- t_pargs pa[] = {
- { "-center", FALSE, etBOOL, {&bCenter},
- "Center molecule on Z-axis first" },
- { "-trimer", FALSE, etBOOL, {&bTrimer},
- "Make trimer rather than hexamer" },
- { "-alternate",FALSE, etBOOL, {&bAlternate},
- "Turn every other molecule upside down" },
- { "-alterz", FALSE, etREAL, {&alterz},
- "Add this amount to Z-coordinate in every other molecule" },
- { "-radius", FALSE, etREAL, {&rDist},
- "Distance of protein axis from Z-axis (implies [TT]-center[tt])" },
- { "-anglez", FALSE, etREAL, {&rAngleZ},
- "Initial angle of rotation around Z-axis of protein" },
- { "-anglex", FALSE, etREAL, {&rAngleX},
- "Initial angle of rotation around X-axis of protein" }
- };
-#define NPA asize(pa)
- FILE *fp;
- int i,iout,now,natom;
- rvec *xin,*vin,*xout;
- matrix box;
- t_atoms atoms,aout;
- char *infile,*outfile,title[256],buf[32];
-
- CopyRight(stderr,argv[0]);
- parse_common_args(&argc,argv,0,NFILE,fnm,NPA,pa,
- asize(desc),desc,0,NULL);
- bCenter = bCenter || (rDist > 0) || bAlternate;
-
- infile = ftp2fn(efSTX,NFILE,fnm);
- outfile = ftp2fn(efPDB,NFILE,fnm);
-
- get_stx_coordnum(infile,&natom);
- init_t_atoms(&atoms,natom,TRUE);
- snew(xin,natom);
- snew(xout,natom);
- snew(vin,natom);
- read_stx_conf(infile,title,&atoms,xin,vin,box);
- printf("Read %d atoms\n",atoms.nr);
-
- if (bCenter)
- prep_x(atoms.nr,xin,rDist,rAngleZ,rAngleX);
-
- fp = gmx_ffopen(outfile,"w");
- for(i=0; (i<(bTrimer ? 3 : 6)); i++) {
- rotate_x(atoms.nr,xin,i*(bTrimer ? 120.0 : 60.0),xout,TRUE,
- bAlternate && ((i % 2) != 0),alterz*(((i % 2) == 0) ? 0 : 1));
- sprintf(buf,"Rotated %d degrees",i*(bTrimer ? 120 : 60));
- write_pdbfile(fp,buf,&atoms,xout,box,'A'+i,1+i);
- }
- gmx_ffclose(fp);
-
- gmx_thanx(stderr);
-
- return 0;
-}
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.3.99_development_20071104
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2006, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Groningen Machine for Chemical Simulation
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <math.h>
-#include <string.h>
-#include <ctype.h>
-#include "gromacs/utility/smalloc.h"
-#include "typedefs.h"
-#include "macros.h"
-#include "gromacs/utility/cstringutil.h"
-#include "gromacs/fileio/confio.h"
-#include "gromacs/math/vec.h"
-#include "gromacs/commandline/pargs.h"
-#include "copyrite.h"
-#include "gromacs/fileio/pdbio.h"
-#include "gromacs/utility/strdb.h"
-
-gmx_bool isword(char c)
-{
- return (isalnum(c) || (c=='-') || (c=='_'));
-}
-
-char *strncasestr(char *line,char *str)
-{
- char *dum;
-
- dum=line;
- if (dum) {
- while (strlen(dum) && strncasecmp(dum,str,strlen(str)))
- dum++;
- if (strlen(dum)==0)
- dum=NULL;
- }
-
- return dum;
-}
-
-char *strstr_href(char *line,gmx_bool *bInHREF,int *i_dat,int n_dat,char **dat)
-{
- char *start,*found,*href=NULL;
- gmx_bool bIn;
- int i;
-
- found=NULL;
- *i_dat=-1;
- bIn=*bInHREF;
- start=line;
- do {
- if (bIn) {
- while (strlen(start) && (strncasecmp(start,"</a",3) != 0))
- start++;
- if (strlen(start)>0) {
- start+=3;
- bIn=FALSE;
- }
- }
- else {
- href=strncasestr(start,"<a href");
- if (href)
- bIn=TRUE;
- i=0;
- while((i<n_dat) && !found) {
- found=strncasestr(start,dat[i]);
- if (found) {
- if (href && (found>href))
- found=NULL;
- else {
- if (((found!=start) && isword(found[-1])) ||
- isword(found[strlen(dat[i])]))
- found=NULL;
- else
- *i_dat=i;
- }
- i++;
- }
- }
- }
- } while (strlen(start) && !found && href);
- *bInHREF=bIn;
-
- return found;
-}
-
-int main(int argc, char *argv[])
-{
- static char *desc[] = {
- "[TT]hrefify[tt] adds href's for all the words in the input file which are not",
- "already hyperlinked and which appear in the file specified with the",
- "option [TT]-l[tt].[PAR]",
- "If the href's should call a script, text can be added",
- "with the [TT]-t[tt] option."
- };
-
- int n;
-
- char **text,**str,line[1024],*ptr,*ref,
- start[STRLEN],word[STRLEN],end[STRLEN];
- int n_text,n_str,i_str;
- gmx_bool bInHREF,bIn;
-
- FILE *fp;
- char title[STRLEN];
- int i,l,n_repl;
- t_filenm fnm[] = {
- { efDAT, "-l", "links", ffLIBRD },
- };
-#define NFILE asize(fnm)
- static char *in=NULL,*out=NULL,*excl=NULL,*link_text=NULL;
- static gmx_bool peratom=FALSE;
- t_pargs pa[] = {
- { "-f", FALSE, etSTR, { &in } , "HTML input" },
- { "-o", FALSE, etSTR, { &out } , "HTML output" },
- { "-e", FALSE, etSTR, { &excl } , "Exclude a string from HREF's, "
- "when this option is not set, the filename without path and extension "
- "will be excluded from HREF's"},
- { "-t", FALSE, etSTR, { &link_text } , "Insert a string in front of the "
- "href file name, useful for scripts" }
- };
-
- CopyRight(stderr,argv[0]);
- parse_common_args(&argc,argv,0,NFILE,fnm,asize(pa),pa,
- asize(desc),desc,0,NULL);
-
- if (!in || !out)
- gmx_fatal(FARGS,"Input or output filename is not set");
-
- n_text = get_file(in, &text);
- fprintf(stderr,"Read %d lines from %s\n",n_text,in);
-
- n_str=get_file(ftp2fn(efDAT,NFILE,fnm),&str);
- fprintf(stderr,"Read %d strings %s\n",n_str,ftp2fn(efDAT,NFILE,fnm));
- if (!excl) {
- for (i=strlen(in)-1; i>0 && in[i-1]!='/'; i--);
- excl=strdup(in+i);
- for(i=strlen(excl)-1; i>0 && (excl[i]!='.'); i--);
- if (excl[i]=='.')
- excl[i]='\0';
- }
- fprintf(stderr,"Excluding '%s' from references\n",excl);
- for(l=0; l<n_str && strcasecmp(str[l],excl); l++);
- if (l<n_str) {
- for(i=l+1; i<n_str; i++)
- str[i-1]=str[i];
- n_str--;
- }
-
- if (!link_text)
- link_text=strdup("\0");
- else
- fprintf(stderr,"Adding '%s' to href's\n",link_text);
-
- fp=gmx_ffopen(out,"w");
-
- n_repl=0;
- i_str=-1;
- bInHREF=FALSE;
- for(l=0; l<n_text; l++) {
- strcpy(line,text[l]);
- do {
- bIn=bInHREF;
- ptr=strstr_href(line,&bIn,&i_str,n_str,str);
- if (ptr) {
- ref=ptr;
- if ((ref!=line) && (ref[-1]=='.')) {
- ref--;
- while((ref>line) && isword(ref[-1]))
- ref--;
- }
- strcpy(start,line);
- start[ref-line]='\0';
- strcpy(word,ref);
- word[ptr-ref+strlen(str[i_str])]='\0';
- strcpy(end,ptr+strlen(str[i_str]));
- sprintf(line,"%s<a href=\"%s%s.html\">%s</a>%s",
- start,link_text,str[i_str],word,end);
- fprintf(stderr,"line %d: %s\n",l+1,str[i_str]);
- n_repl++;
- }
- } while (ptr);
- bInHREF=bIn;
- fprintf(fp,"%s\n",line);
- }
-
- gmx_ffclose(fp);
-
- fprintf(stderr,"Added %d HTML references\n",n_repl);
-
- return 0;
-}
-
+++ /dev/null
-C
-C This source code is part of
-C
-C G R O M A C S
-C
-C GROningen MAchine for Chemical Simulations
-C
-C VERSION 3.0
-C
-C Copyright (c) 1991-2001
-C BIOSON Research Institute, Dept. of Biophysical Chemistry
-C University of Groningen, The Netherlands
-C
-C This program is free software; you can redistribute it and/or
-C modify it under the terms of the GNU General Public License
-C as published by the Free Software Foundation; either version 2
-C of the License, or (at your option) any later version.
-C
-C If you want to redistribute modifications, please consider that
-C scientific software is very special. Version control is crucial -
-C bugs must be traceable. We will be happy to consider code for
-C inclusion in the official distribution, but derived work must not
-C be called official GROMACS. Details are found in the README & COPYING
-C files - if they are missing, get the official version at www.gromacs.org.
-C
-C To help us fund GROMACS development, we humbly ask that you cite
-C the papers on the package - you can find them in the top README file.
-C
-C Do check out http://www.gromacs.org , or mail us at gromacs@gromacs.org .
-C
-C And Hey:
-C GROup of MAchos and Cynical Suckers
-
-C
-C This code is meant to be called from C routines.
-C Therefore all indices start at 0, although the arrays
-C start at 1, if an array contains an index we must add 1 to it.
-C EG: jjnr points to particles starting at 0
-C type is indexed from 1 to ...
-C
-
- subroutine FORLJC(ix,iy,iz,qi,
- $ pos,nj,type,jjnr,charge,nbfp,
- $ faction,fip,
- $ Vc,Vnb)
-
- implicit none
-
- real ix,iy,iz,qi
- real pos(*),charge(*),faction(*),fip(3)
- integer*4 nj,jjnr(*),type(*)
- real Vc,Vnb,nbfp(*)
-
- integer k,jnr,j3,tj
- real twelve,six
- real fX,fY,fZ
- real rijX,rijY,rijZ
- real fijscal,vijcoul
- real vctot,vnbtot
- real rinv1,rinv2,rinv6
- real fjx,fjy,fjz
- real tx,ty,tz,vnb6,vnb12
-
- parameter(twelve=12.0,six=6.0)
-
- fX = 0
- fY = 0
- fZ = 0
- vctot = 0
- vnbtot = 0
-
-cray compiler directive ignore vector dependencies
-c$dir ivdep
- do k=1,nj
- jnr = jjnr(k)+1
- j3 = 3*jnr-2
- rijX = ix - pos(j3)
- rijY = iy - pos(j3+1)
- rijZ = iz - pos(j3+2)
-
- rinv1 = 1.0/sqrt((rijX*rijX)+(rijY*rijY)+(rijZ*rijZ))
- rinv2 = rinv1*rinv1
- rinv6 = rinv2*rinv2*rinv2
-
- tj = 2*type(jnr)+1
- vnb6 = nbfp(tj)*rinv6
- vnb12 = nbfp(tj+1)*rinv6*rinv6
- vijcoul = qi*charge(jnr)*rinv1
-
- vctot = vctot+vijcoul
- vnbtot = vnbtot+vnb12-vnb6
- fijscal = (twelve*vnb12-six*vnb6+vijcoul)*rinv2
-
- fjx = faction(j3)
- tx = rijX*fijscal
- fX = fX + tx
- faction(j3) = fjx - tx
- fjy = faction(j3+1)
- ty = rijY*fijscal
- fY = fY + ty
- faction(j3+1) = fjy - ty
- fjz = faction(j3+2)
- tz = rijZ*fijscal
- fZ = fZ + tz
- faction(j3+2) = fjz - tz
-
- end do
-
- fip(1) = fX
- fip(2) = fY
- fip(3) = fZ
- Vc = Vc + vctot
- Vnb = Vnb + vnbtot
-
- return
-
- end
-
- program main
-
- implicit none
-
- integer maxatom,maxx,maxlist,maxtype
- parameter(maxatom=1000,maxx=3*maxatom,maxlist=100)
- parameter(maxtype=19)
-
- real*4 ix,iy,iz,qi,pos(maxx),faction(maxx),fip(3)
- real*4 charge(maxatom),nbfp(2*maxtype),Vc,Vnb
- integer type(maxatom),jjnr(maxlist)
- integer i,i3,j
-
-c setup benchmark
- do i=1,maxtype
- nbfp(2*i-1) = 1e-3
- nbfp(2*i) = 1e-6
- end do
-
- type(1)=1
- do i=2,maxatom
- type(i)=1+mod(type(i-1)+91,maxtype)
- end do
-
- do i=1,maxatom
- i3=3*(i-1)
- pos(i3+1) = i
- pos(i3+2) = i
- pos(i3+3) = 1
-
- charge(i) = mod(i,2)-0.5
- end do
-
- jjnr(1) = 13
- do i=2,maxlist
- jjnr(i) = mod(jjnr(i-1)+13,maxatom)
- end do
-
- ix = 0.0
- iy = 0.0
- iz = 0.0
- qi = 1.0
- Vc = 0.0
- Vnb= 0.0
-
-c run it
-
-
- do j=1,100
- do i=1,maxatom
-
- call FORLJC(ix,iy,iz,qi,
- $ pos,maxlist,type,jjnr,charge,nbfp,
- $ faction,fip,
- $ Vc,Vnb)
-
- end do
- end do
-
- print *,Vc, Vnb
-
- stop
- end
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.3.99_development_20071104
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2006, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Groningen Machine for Chemical Simulation
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <math.h>
-#include "typedefs.h"
-#include "gromacs/commandline/pargs.h"
-#include "copyrite.h"
-#include "gromacs/utility/fatalerror.h"
-#include "gromacs/fileio/pdbio.h"
-#include "macros.h"
-#include "gromacs/utility/smalloc.h"
-#include "gromacs/math/vec.h"
-#include "gromacs/pbcutil/pbc.h"
-#include "gromacs/math/units.h"
-#include "names.h"
-#include "txtdump.h"
-#include "gromacs/fileio/trrio.h"
-#include "gromacs/topology/symtab.h"
-#include "gromacs/utility/strdb.h"
-#include "gromacs/fileio/confio.h"
-
-#define TET 109.47
-#define DCONS 0.117265878
-
-typedef struct {
- int n,aa[4];
-} t_bbb;
-
-static char *watname[] = { "OW ", "HW1", "HW2", "DW", "SW" };
-static char *diamname[] = { "C1", "H2", "H3", "H4", "H5", "H2", "H3", "H4", "H5" };
-static real qspc[] = { -0.82, 0.41, 0.41 };
-static real qyaw[] = { 1.24588, 0.62134, 0.62134, 0.0, -2.48856 };
-static real spc_lj[3][6] = {
- { 2.6171e-3, 2.6331e-6, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0 }
-};
-#define CHH 2e-9
-#define CHS 2e-9
-#define COS 2e-6
-static real yaw_lj[5][10] = {
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, COS },
- { 0, 0, 0, CHH, 0, CHH, 0, 0, 0, CHS },
- { 0, 0, 0, CHH, 0, CHH, 0, 0, 0, CHS },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, COS, 0, CHS, 0, CHS, 0, 0, 2.6e-3, 0 }
-};
-
-void unitcell(rvec x[],rvec box,gmx_bool bYaw,real odist,real hdist)
-{
-#define cx 0.81649658
-#define cy 0.47140452
-#define cy2 0.94280904
-#define cz 0.33333333
-
- rvec xx[24] = {
- { 0, 0, 0 }, /* O1 */
- { 0, 0, 1 }, /* H relative to Oxygen */
- { cx, cy, -cz },
- { cx, cy, -cz }, /* O2 */
- { 0, 0, -1 }, /* H relative to Oxygen */
- { cx,-cy, +cz },
- { cx, cy+cy2, 0 }, /* O3 */
- { -cx, cy, -cz }, /* H relative to Oxygen */
- { 0, -cy2, -cz },
- { 0, 2*cy+cy2, -cz }, /* O4 */
- {-cx,-cy, +cz }, /* H relative to Oxygen */
- { 0 , cy2, +cz },
- { 0, 0, 1 }, /* O5 */
- {-cx, cy, +cz }, /* H relative to Oxygen */
- { 0 , -cy2, +cz },
- { cx, cy, 1+cz }, /* O6 */
- { -cx, -cy, -cz }, /* H relative to Oxygen */
- { 0, cy2, -cz },
- { cx, cy+cy2, 1 }, /* O7 */
- { 0, 0, -1 }, /* H relative to Oxygen */
- { cx, cy, +cz },
- { 0, 2*cy+cy2,1+cz }, /* O8 */
- { 0, 0, 1 }, /* H relative to Oxygen */
- { cx, -cy, -cz }
- };
- int i,iin,iout,j,m;
- rvec tmp,t2,dip;
-
- clear_rvec(dip);
- for(i=0; (i<8); i++) {
- iin = 3*i;
- if (bYaw)
- iout = 5*i;
- else
- iout = iin;
- svmul(odist,xx[iin],x[iout]);
- svmul(-0.82,x[iout],t2);
- rvec_inc(dip,t2);
- for(j=1; (j<=2); j++) {
- svmul(hdist,xx[iin+j],tmp);
- rvec_add(x[iout],tmp,x[iout+j]);
- svmul(0.41,x[iout+j],t2);
- rvec_inc(dip,t2);
- }
- if (bYaw)
- for(m=0; (m<DIM); m++)
- x[iout+3][m] = x[iout+4][m] =
- (1-2*DCONS)*x[iout][m]+DCONS*(x[iout+1][m]+x[iout+2][m]);
- }
-
- box[XX] = 2*cx;
- box[YY] = 2*(cy2+cy);
- box[ZZ] = 2*(1+cz);
- for(i=0; (i<DIM); i++)
- box[i] *= odist;
-
- printf("Unitcell: %10.5f %10.5f %10.5f\n",box[XX],box[YY],box[ZZ]);
- printf("Dipole: %10.5f %10.5f %10.5f (e nm)\n",dip[XX],dip[YY],dip[ZZ]);
-}
-
-void random_h_coords(int natmol,int nmol,rvec x[],rvec box,
- gmx_bool bYaw,real odist,real hdist)
-{
-#define cx 0.81649658
-#define cy 0.47140452
-#define cy2 0.94280904
-#define cz 0.33333333
-
- rvec xx[24] = {
- { 0, 0, 0 }, /* O1 */
- { 0, 0, 1 }, /* H relative to Oxygen */
- { cx, cy, -cz },
- { cx, cy, -cz }, /* O2 */
- { 0, 0, -1 }, /* H relative to Oxygen */
- { cx,-cy, +cz },
- { cx, cy+cy2, 0 }, /* O3 */
- { -cx, cy, -cz }, /* H relative to Oxygen */
- { 0, -cy2, -cz },
- { 0, 2*cy+cy2, -cz }, /* O4 */
- {-cx,-cy, +cz }, /* H relative to Oxygen */
- { 0 , cy2, +cz },
- { 0, 0, 1 }, /* O5 */
- {-cx, cy, +cz }, /* H relative to Oxygen */
- { 0 , -cy2, +cz },
- { cx, cy, 1+cz }, /* O6 */
- { -cx, -cy, -cz }, /* H relative to Oxygen */
- { 0, cy2, -cz },
- { cx, cy+cy2, 1 }, /* O7 */
- { 0, 0, -1 }, /* H relative to Oxygen */
- { cx, cy, +cz },
- { 0, 2*cy+cy2,1+cz }, /* O8 */
- { 0, 0, 1 }, /* H relative to Oxygen */
- { cx, -cy, -cz }
- };
- int i,iin,iout,j,m;
- rvec tmp,t2,dip;
-
- clear_rvec(dip);
- for(i=0; (i<nmol); i++) {
- iin = natmol*i;
- iout = iin;
- svmul(odist,x[iin],x[iout]);
- svmul(-0.82,x[iout],t2);
- rvec_inc(dip,t2);
- for(j=1; (j<=2); j++) {
- svmul(hdist,xx[3*(i % 8)+j],tmp);
- rvec_add(x[iout],tmp,x[iout+j]);
- svmul(0.41,x[iout+j],t2);
- rvec_inc(dip,t2);
- }
- }
-
- box[XX] = 2*cx;
- box[YY] = 2*(cy2+cy);
- box[ZZ] = 2*(1+cz);
- for(i=0; (i<DIM); i++)
- box[i] *= odist;
-
- printf("Unitcell: %10.5f %10.5f %10.5f\n",box[XX],box[YY],box[ZZ]);
- printf("Dipole: %10.5f %10.5f %10.5f (e nm)\n",dip[XX],dip[YY],dip[ZZ]);
-}
-
-void unitcell_d(rvec x[],rvec box,real odist)
-{
- rvec cc[8] = {
- { 0, 0, 0 }, /* C1 */
- { cx, cy, -cz }, /* C2 */
- { cx, cy+cy2, 0 }, /* C3 */
- { 0, 2*cy+cy2, -cz }, /* C4 */
- { 0, 0, 1 }, /* C5 */
- { cx, cy, 1+cz }, /* C6 */
- { cx, cy+cy2, 1 }, /* C7 */
- { 0, 2*cy+cy2,1+cz }, /* C8 */
- };
- rvec hh[4] = {
- { 0, 0, 1 }, /* H relative to C */
- { cx, cy, -cz },
- { cx, -cy, -cz },
- {-cy2, 0, -cz }
- };
- int i,iin,iout,j,m;
- rvec tmp,t2,dip;
-
- clear_rvec(dip);
- for(i=0; (i<8); i++) {
- iin = i;
- iout = i;
- svmul(odist,cc[iin],x[iout]);
- }
- box[XX] = 2*cx;
- box[YY] = 2*(cy2+cy);
- box[ZZ] = 2*(1+cz);
- for(i=0; (i<DIM); i++)
- box[i] *= odist;
-
- printf("Unitcell: %10.5f %10.5f %10.5f\n",box[XX],box[YY],box[ZZ]);
-}
-
-static t_bbb *mk_bonds(int natoms,rvec x[],real odist,
- gmx_bool bPBC,matrix box)
-{
- real od2 = odist*odist+1e-5;
- t_pbc pbc;
- t_bbb *bbb;
- int i,j;
- rvec dx;
-
- if (bPBC)
- set_pbc(&pbc,box);
- snew(bbb,natoms);
- for(i=0; (i<natoms); i++) {
- for(j=i+1; (j<natoms); j++) {
- if (bPBC)
- pbc_dx(&pbc,x[i],x[j],dx);
- else
- rvec_sub(x[i],x[j],dx);
- if (iprod(dx,dx) <= od2) {
- bbb[i].aa[bbb[i].n++] = j;
- bbb[j].aa[bbb[j].n++] = i;
- }
- }
- }
- if (debug)
-#define PRB(nn) (bbb[(i)].n >= (nn)) ? bbb[i].aa[nn-1] : -1
- for(i=0; (i<natoms); i++)
- fprintf(debug,"bonds from %3d: %d %d %d %d\n",
- i,PRB(1),PRB(2),PRB(3),PRB(4));
-#undef PRB
- return bbb;
-}
-
-static void mk_diamond(t_atoms *a,rvec x[],real odist,t_symtab *symtab,
- gmx_bool bPBC,matrix box)
-{
-
- int i,ib,j,k,l,m,nrm=0;
- t_bbb *bbb;
- gmx_bool *bRemove;
- rvec dx;
-
- do {
- nrm = 0;
- bbb = mk_bonds(a->nr,x,odist,bPBC,box);
-
- for(i=0; (i<a->nr); i++) {
- if (bbb[i].n < 2) {
- for(k=0; (k<bbb[i].n); k++) {
- ib = bbb[i].aa[k];
- for(j=0; (j<bbb[ib].n); j++)
- if (bbb[ib].aa[j] == i)
- break;
- if (j == bbb[ib].n)
- gmx_fatal(FARGS,"Bond inconsistency (%d not in list of %d)!\n",i,ib);
- for( ; (j<bbb[ib].n-1); j++)
- bbb[ib].aa[j] = bbb[ib].aa[j+1];
- bbb[ib].n--;
- nrm++;
- }
- bbb[i].n = 0;
- }
- }
-
- for(i=j=0; (i<a->nr); i++) {
- if (bbb[i].n >= 2) {
- copy_rvec(x[i],x[j]);
- j++;
- }
- }
- fprintf(stderr,"Kicking out %d carbon atoms (out of %d)\n",
- a->nr-j,a->nr);
- a->nr = j;
- sfree(bbb);
- } while (nrm > 0);
- /* Rename atoms */
- bbb = mk_bonds(a->nr,x,odist,bPBC,box);
- for(i=0; (i<a->nr); i++) {
- switch (bbb[i].n) {
- case 4:
- a->atomname[i] = put_symtab(symtab,"C");
- break;
- case 3:
- a->atomname[i] = put_symtab(symtab,"CH1");
- break;
- case 2:
- a->atomname[i] = put_symtab(symtab,"CH2");
- break;
- default:
- gmx_fatal(FARGS,"This atom (%d) has %d bonds only",i,bbb[i].n);
- }
- }
- sfree(bbb);
-}
-
-static real calc_ener(real c6,real c12,rvec dx,tensor vir)
-{
- real r,e,f;
- int m,n;
-
- r = norm(dx);
- e = c12*pow(r,-12.0) - c6*pow(r,-6.0);
- f = 12*c12*pow(r,-14.0) - 6*c6*pow(r,-8.0);
- for(m=0; (m<DIM); m++)
- for(n=0; (n<DIM); n++)
- vir[m][n] -= 0.5*f*dx[m]*dx[n];
-
- return e;
-}
-
-static int read_rel_coords(char *fn,rvec **xx,int natmol)
-{
- int i,nline;
- double x,y,z;
- char **strings=NULL;
-
- nline = get_file(fn,&strings);
- printf("Read %d lines from %s\n",nline,fn);
- snew(*xx,nline*natmol);
- for(i=0; (i<nline); i++) {
- if (sscanf(strings[i],"%lf%lf%lf",&x,&y,&z) != 3)
- gmx_fatal(FARGS,"Not enough arguments on line %d of file %s (should be 3)",i,fn);
- (*xx)[natmol*i][XX] = x;
- (*xx)[natmol*i][YY] = y;
- (*xx)[natmol*i][ZZ] = z;
- }
- return natmol*nline;
-}
-
-void virial(FILE *fp,gmx_bool bFull,int nmol,rvec x[],matrix box,real rcut,
- gmx_bool bYaw,real q[],gmx_bool bLJ)
-{
- int i,j,im,jm,natmol,ik,jk,m,ninter;
- rvec dx,f,ftot,dvir,vir,pres,xcmi,xcmj,*force;
- real dx6,dx2,dx1,fscal,c6,c12,vcoul,v12,v6,vctot,v12tot,v6tot;
- t_pbc pbc;
-
- set_pbc(&pbc,box);
- fprintf(fp,"%3s - %3s: %6s %6s %6s %6s %8s %8s %8s\n",
- "ai","aj","dx","dy","dz","|d|","virx","viry","virz");
- clear_rvec(ftot);
- clear_rvec(vir);
- ninter = 0;
- vctot = 0;
- v12tot = 0;
- v6tot = 0;
- natmol = bYaw ? 5 : 3;
- snew(force,nmol*natmol);
-
- for(i=0; (i<nmol); i++) {
- im = natmol*i;
- /* Center of geometry */
- clear_rvec(xcmi);
- for(ik=0; (ik<natmol); ik++)
- rvec_inc(xcmi,x[im+ik]);
- for(m=0; (m<DIM); m++)
- xcmi[m] /= natmol;
-
- for(j=i+1; (j<nmol); j++) {
- jm = natmol*j;
- /* Center of geometry */
- clear_rvec(xcmj);
- for(jk=0; (jk<natmol); jk++)
- rvec_inc(xcmj,x[jm+jk]);
- for(m=0; (m<DIM); m++)
- xcmj[m] /= natmol;
-
- /* First check COM-COM distance */
- pbc_dx(&pbc,xcmi,xcmj,dx);
- if (norm(dx) < rcut) {
- ninter++;
- /* Neirest neighbour molecules! */
- clear_rvec(dvir);
- for(ik=0; (ik<natmol); ik++) {
- for(jk=0; (jk<natmol); jk++) {
- pbc_dx(&pbc,x[im+ik],x[jm+jk],dx);
- dx2 = iprod(dx,dx);
- dx1 = sqrt(dx2);
- vcoul = q[ik]*q[jk]*ONE_4PI_EPS0/dx1;
- vctot += vcoul;
-
- if (bLJ) {
- if (bYaw) {
- c6 = yaw_lj[ik][2*jk];
- c12 = yaw_lj[ik][2*jk+1];
- }
- else {
- c6 = spc_lj[ik][2*jk];
- c12 = spc_lj[ik][2*jk+1];
- }
- dx6 = dx2*dx2*dx2;
- v6 = c6/dx6;
- v12 = c12/(dx6*dx6);
- v6tot -= v6;
- v12tot+= v12;
- fscal = (vcoul+12*v12-6*v6)/dx2;
- }
- else
- fscal = vcoul/dx2;
- for(m=0; (m<DIM); m++) {
- f[m] = dx[m]*fscal;
- dvir[m] -= 0.5*dx[m]*f[m];
- }
- rvec_inc(force[ik+im],f);
- rvec_dec(force[jk+jm],f);
- /*if (bFull)
- fprintf(fp,"%3s%4d-%3s%4d: %6.3f %6.3f %6.3f %6.3f"
- " %8.3f %8.3f %8.3f\n",
- watname[ik],im+ik,watname[jk],jm+jk,
- dx[XX],dx[YY],dx[ZZ],norm(dx),
- dvir[XX],dvir[YY],dvir[ZZ]);*/
- }
- }
- if (bFull)
- fprintf(fp,"%3s%4d-%3s%4d: "
- " %8.3f %8.3f %8.3f\n",
- "SOL",i,"SOL",j,dvir[XX],dvir[YY],dvir[ZZ]);
- rvec_inc(vir,dvir);
- }
- }
- }
- fprintf(fp,"There were %d interactions between the %d molecules (%.2f %%)\n",
- ninter,nmol,(real)ninter/(0.5*nmol*(nmol-1)));
- fprintf(fp,"Vcoul: %10.4e V12: %10.4e V6: %10.4e Vtot: %10.4e (kJ/mol)\n",
- vctot/nmol,v12tot/nmol,v6tot/nmol,(vctot+v12tot+v6tot)/nmol);
- pr_rvec(fp,0,"vir ",vir,DIM,TRUE);
-
- for(m=0; (m<DIM); m++)
- pres[m] = -2*PRESFAC/(det(box))*vir[m];
- pr_rvec(fp,0,"pres",pres,DIM,TRUE);
- pr_rvecs(fp,0,"force",force,natmol*nmol);
- sfree(force);
-}
-
-
-
-int main(int argc,char *argv[])
-{
- static char *desc[] = {
- "[TT]mkice[tt] generates an ice crystal in the Ih crystal form which is the",
- "most stable form. The rectangular unitcell contains eight molecules",
- "and all oxygens are tetrahedrally coordinated.[PAR]",
- "If an input file is given it is interpreted as a series of oxygen",
- "coordinates the distance between which can be scaled by the odist flag.",
- "The program then adds hydrogens to the oxygens in random orientation",
- "but with proper OH distances and HOH angle. This feature allows one to",
- "build water clusters based on oxygen coordinates only."
- };
- static int nx=1,ny=1,nz=1;
- static gmx_bool bYaw=FALSE,bLJ=TRUE,bFull=TRUE,bSeries=FALSE;
- static gmx_bool bOrdered=TRUE,bDiamond=FALSE,bPBC=TRUE;
- static real rcut=0.3,odist=0.274,hdist=0.09572;
- t_pargs pa[] = {
- { "-nx", FALSE, etINT, {&nx}, "nx" },
- { "-ny", FALSE, etINT, {&ny}, "ny" },
- { "-nz", FALSE, etINT, {&nz}, "nz" },
- { "-yaw", FALSE, etBOOL, {&bYaw},
- "Generate virtual sites and shell positions" },
- { "-lj", FALSE, etBOOL, {&bLJ},
- "Use LJ as well as coulomb for virial calculation" },
- { "-rcut", FALSE,etREAL, {&rcut},"Cut-off for virial calculations" },
- { "-full", FALSE,etBOOL, {&bFull},"Full virial output" },
- { "-odist", FALSE, etREAL, {&odist}, "Distance (nm) between oxygens" },
- { "-hdist", FALSE, etREAL, {&hdist}, "Bondlength (nm) for OH bond" },
- { "-diamond",FALSE,etBOOL, {&bDiamond}, "Make a diamond instead" },
- { "-pbc", FALSE, etBOOL, {&bPBC}, "Make a periodic diamond" },
- { "-order", FALSE,etBOOL, {&bOrdered}, "Make a proton-ordered ice lattice" },
- { "-series",FALSE, etBOOL, {&bSeries},
- "Do a series of virial calculations with different cut-off (from 0.3 up till the specified one)" }
- };
- t_filenm fnm[] = {
- { efSTO, "-p", "ice", ffWRITE },
- { efSTO, "-c", NULL, ffOPTRD },
- { efDAT, "-f", NULL, ffOPTRD },
- { efTRN, "-o", "ice", ffOPTWR }
- };
-#define NFILE asize(fnm)
-
- FILE *fp;
- char *fn,quote[256];
- int i,j,k,n,nmax,m,natom,natmol;
- t_atoms *pdba;
- t_atoms atoms;
- t_symtab symtab;
- rvec box,tmp,*xx;
- matrix boxje;
-
- CopyRight(stdout,argv[0]);
- parse_common_args(&argc,argv,0,NFILE,fnm,asize(pa),pa,asize(desc),
- desc,0,NULL);
- if (debug) {
- fprintf(debug,"nx = %3d, ny = %3d, nz = %3d\n",nx,ny,nz);
- fprintf(debug,"YAW = %3s, LJ = %3s, rcut = %g\n",yesno_names[bYaw],
- yesno_names[bLJ],rcut);
- }
-
- if (bYaw)
- natmol = 5;
- else if (bDiamond)
- natmol = 1;
- else
- natmol = 3;
-
- if (opt2bSet("-f",NFILE,fnm)) {
- natom = read_rel_coords(opt2fn("-f",NFILE,fnm),&xx,natmol);
- nmax = natom;
- }
- else {
- natom = natmol*8;
- nmax = natom*nx*ny*nz;
- snew(xx,nmax);
- }
- snew(pdba,1);
- init_t_atoms(pdba,nmax,TRUE);
- pdba->nr = nmax;
- open_symtab(&symtab);
- for(n=0; (n<nmax); n++) {
- pdba->pdbinfo[n].type = epdbATOM;
- pdba->pdbinfo[n].atomnr = 1+n;
- pdba->atom[n].resnr = 1+(n/natmol);
- pdba->atomname[n] = put_symtab(&symtab,
- bDiamond ? diamname[(n % natmol)] : watname[(n % natmol)]);
- if (bDiamond)
- pdba->resname[n] = put_symtab(&symtab,"DIA");
- else
- pdba->resname[n] = put_symtab(&symtab,"SOL");
- sprintf(pdba->pdbinfo[n].pdbresnr,"%d",n);
- pdba->atom[n].chain = ' ';
- }
-
- /* Generate the unit cell */
- if (bDiamond)
- unitcell_d(xx,box,odist);
- else if (opt2bSet("-f",NFILE,fnm)) {
- random_h_coords(natmol,natom/natmol,xx,box,bYaw,odist,hdist);
- }
- else
- unitcell(xx,box,bYaw,odist,hdist);
- if (debug) {
- clear_mat(boxje);
- boxje[XX][XX] = box[XX];
- boxje[YY][YY] = box[YY];
- boxje[ZZ][ZZ] = box[ZZ];
- }
- n=0;
- for(i=0; (i<nx); i++) {
- tmp[XX] = i*box[XX];
- for(j=0; (j<ny); j++) {
- tmp[YY] = j*box[YY];
- for(k=0; (k<nz); k++) {
- tmp[ZZ] = k*box[ZZ];
- for(m=0; (m<natom); m++,n++) {
- if ((!bOrdered && ((m % natmol) == 0)) || bOrdered)
- rvec_add(xx[n % natom],tmp,xx[n]);
- else
- ;
- }
- }
- }
- }
-
- clear_mat(boxje);
- boxje[XX][XX] = box[XX]*nx;
- boxje[YY][YY] = box[YY]*ny;
- boxje[ZZ][ZZ] = box[ZZ]*nz;
-
- printf("Crystal: %10.5f %10.5f %10.5f\n",
- nx*box[XX],ny*box[YY],nz*box[ZZ]);
-
- if (debug && !bDiamond) {
- if (bSeries)
- for(i=3; (i<=10*rcut); i++) {
- fprintf(debug,"This is with rcut = %g\n",i*0.1);
- virial(debug,bFull,nmax/natmol,xx,boxje,
- 0.1*i,bYaw,bYaw ? qyaw : qspc,bLJ);
- }
- else
- virial(debug,bFull,nmax/natmol,xx,boxje,
- rcut,bYaw,bYaw ? qyaw : qspc,bLJ);
- }
-
- if (bDiamond)
- mk_diamond(pdba,xx,odist,&symtab,bPBC,boxje);
-
- fn = ftp2fn(efSTO,NFILE,fnm);
- if (fn2ftp(fn) == efPDB) {
- fp = gmx_ffopen(fn,"w");
- if (bDiamond)
- fprintf(fp,"HEADER This is a *diamond*\n");
- else
- fprintf(fp,"HEADER A beautiful Ice Ih crystal\n");
- fprintf(fp,"REMARK Generated by mkice with the following options:\n"
- "REMARK nx = %d, ny = %d, nz = %d, odist = %g, hdist = %g\n",
- nx,ny,nz,odist,hdist);
- bromacs(quote,255);
- write_pdbfile(fp,quote,pdba,xx,boxje,' ',-1);
- gmx_ffclose(fp);
- }
- else {
- bromacs(quote,255);
- write_sto_conf(fn,quote,pdba,xx,NULL,boxje);
- }
-
- if (ftp2bSet(efTRN,NFILE,fnm))
- write_trn(ftp2fn(efTRN,NFILE,fnm),0,0,0,boxje,nmax,xx,NULL,NULL);
-
- return 0;
-}
-
+++ /dev/null
-/*
- * Print a lookup table for Gaussian numbers with 4 entries on each
- * line, formatted for inclusion in this file. Size is 2^bits.
- */
-
-void
-print_gaussian_table(int bits)
-{
- int n,nh,i,j;
- double invn,fac,x,invgauss,det,dx;
- real *table;
-
- n = 1 << bits;
- table = (real *)malloc(n*sizeof(real));
-
- /* Fill a table of size n such that random draws from it
- * produce a Gaussian distribution.
- * We integrate the Gaussian distribution G approximating:
- * integral(x->x+dx) G(y) dy
- * with:
- * G(x) dx + G'(x) dx^2/2 = G(x) dx - G(x) x dx^2/2
- * Then we need to find dx such that the integral is 1/n.
- * The last step uses dx = 1/x as the approximation is not accurate enough.
- */
- invn = 1.0/n;
- fac = sqrt(2*M_PI);
- x = 0.5*fac*invn;
- nh = n/2;
- for(i=0; i<nh; i++) {
- if (i > 0) {
- if (i < nh-1) {
- invgauss = fac*exp(0.5*x*x);
- /* det is larger than 0 for all x, except for the last */
- det = 1 - 2*invn*x*invgauss;
- dx = (1 - sqrt(det))/x;
- } else {
- dx = 1/x;
- }
- x = x + dx;
- }
- table[nh-1-i] = -x;
- table[nh+i] = x;
- }
- printf("static const real *\ngaussian_table[%d] = {\n",n);
- for(i=0;i<n;i+=4) {
- printf(" ");
- for(j=0;j<4;j++) {
- printf("%14.7e",table[i+j]);
- if(i+j<(n-1))
- printf(",");
- }
- printf("\n");
- }
- printf("};\n");
- free(table);
-}
-
+++ /dev/null
-#!/bin/awk -f
-
-# reads Amber forcefield definition file(s) and converts to Gromacs
-# Version 1.1
-# Copyright (c) 2002
-# Anton Feenstra - Vrije Universiteit Amsterdam - The Netherlands
-
-function abs(r) {
- return sqrt(r^2);
-}
-
-# unit conversion functions:
-
-# Angstrom (1e-10 m) to nanometers (1e-9 m)
-function A2nm(a) {
- return a/10;
-}
-
-# Angstrom^-1 to nanometers^-1
-function pA2pnm(a) {
- return a*10;
-}
-
-# kCalories to kJoules
-function kcal2kj(e) {
- return e * 4.1868;
-}
-
-# kCal mol^-1 A^-n to kJoule mol^-1 nm^-n
-# 'n' is usually 2 (for bonds) or 6 or 12 (for LJ)
-function kcalpmolpA2kjpmolpnm(k, n) {
- kk=kcal2kj(k);
- for(ki=0; ki<n; ki++)
- kk=pA2pnm(kk);
- return kk;
-}
-
-function warning(s) {
- printf("WARNING: %s\n", s);
- nwarn++;
-}
-
-function print_warn() {
- if (nwarn)
- printf("\nThere were %d warnings\n\n", nwarn);
-}
-
-function fatal_error(s) {
- printf("FATAL ERROR: %s\n", s);
- exit -1;
-}
-
-BEGIN {
- if (ARGC < 2) {
- print("Usage:");
- print("amber2gmxff [ffname=<name>] [debug=1] parm##.dat");
- print("");
- print("Reads Amber forcefield definition file (parm##.dat) and writes");
- print("Gromacs forcefield files:");
- print("ff<name>.atp, ff<name>.itp, ff<name>nb.itp, ff<name>bon.itp");
- print("Default for <name> is 'amber'.");
- print("");
- print("Use 'debug=1' for extremely verbose output.");
- print("");
- xxit=1;
- exit;
- }
- if ( !ffname ) ffname="amber";
- ffbon = "ff" ffname "bon.itp";
- ffnb = "ff" ffname "nb.itp";
- ffmain= "ff" ffname ".itp";
- ffatp = "ff" ffname ".atp";
- ffpdihs = ffname "-dihedrals.txt";
- ffidihs = ffname "-impropers.txt";
- printf("Sending output to: %s, %s and %s\n", ffmain, ffnb, ffbon);
- printf("; Amber forcefield converted to Gromacs\n") > ffnb;
- printf("; from file %s\n", ARGV[1]) > ffnb;
- printf("; \n") > ffnb;
- printf("; Amber forcefield converted to Gromacs\n") > ffbon;
- printf("; from file %s\n", ARGV[1]) > ffbon;
- printf("\n") > ffbon;
- type=0;
- nat=0; # atoms
- nb=0; # bonds
- na=0; # angles
- np=0; # propers
- ni=0; # impropers
- nhb=0; # H-bonds (10-12)
- neq=0; # equivalent 6-12
- nlj=0; # LJ (6-12)
- section[tp_TITL=0]="title";
- section[tp_ATOM=1]="atom";
- section[tp_HYDR=2]="hydro";
- section[tp_BOND=3]="bond";
- section[tp_ANGL=4]="angle";
- section[tp_PDIH=5]="pdih";
- section[tp_IDIH=6]="idih";
- section[tp_HB =7]="HB";
- section[tp_EQ =8]="eq";
- section[tp_LJ =9]="LJ";
-
-}
-
-# keep track of what we are reading, sections are separated by empty line
-NF==0 {
- if (type==tp_HB) {
- if (bAllZero) {
- printf("; NOTE: all H-bond (10-12) parameters are Zero\n") > ffnb;
- } else {
- printf("; WARNIGN: Not all H-bond (10-12) parameters are Zero\n") > ffnb;
- warning("Not all H-bond (10-12) parameters are Zero\n");
- }
- }
- type++;
- printf("Start reading section: %d = %s\n", type, section[type]);
- next;
-}
-
-type==tp_TITL { # title
- title = $0;
- printf("; %s\n", title) > ffnb;
- printf("; \n") > ffnb;
- printf("; %s\n", title) > ffbon;
- printf("; \n") > ffbon;
- type++;
- next;
-}
-
-type==tp_ATOM { # atoms
- if (debug) printf("; %s\n", $0);
- anm = substr($0, 1, 2) ; # 1- 2
- anms[nat] = anm;
- amass[anm] = substr($0, 4,10)+0; # 4-13
- atpol[anm] = substr($0,15,10)+0; # 15-24
- atcom[anm] = substr($0,38,length); # rest
- nat++;
- if (debug) printf("; '%s' %10g %10g '%s'\n",
- anm, amass[anm], atpol[anm], atcom[anm]);
-}
-
-type==tp_HYDR { # hydrophylic atoms
- if (debug) printf("; %s\n", $0);
- hydrophylics = $0;
- type++;
- next;
-}
-
-type>=tp_BOND && type<=tp_IDIH { # bonded interaction
- ai = substr($0, 1, 2) ; # 1- 2
- aj = substr($0, 4, 2) ; # 4- 5
- ak = substr($0, 7, 2) ; # 7- 8
- al = substr($0,10, 2) ; # 10-11
-}
-
-type==tp_BOND { # bonds
- if (nb==0) {
- printf("\n") > ffbon;
- printf("[ bondtypes ]\n") > ffbon;
- printf(";%4s %5s %4s %8s %8s\n", "ai", "aj", "ft", "b0", "kb") > ffbon;
- printf(";%4s %5s %4s %8s %8s\n","","","", "(nm)", "(kj/mol/nm2)") > ffbon;
- ft=1;
- }
- if (debug) printf("; %s\n", $0);
- ibt[nb] = ai;
- jbt[nb] = aj;
- rk[nb] = kcalpmolpA2kjpmolpnm(substr($0, 6,10), 2); # 6-15
- req[nb] = A2nm(substr($0,16,10)); # 16-25
- bcom[nb]= substr($0,29,length); # rest
- printf("%5s %5s %4d %8g %8g ; %s\n",
- ibt[nb], jbt[nb], ft, req[nb], rk[nb], bcom[nb]) > ffbon;
- nb++;
-}
-
-type==tp_ANGL { # angles
- if (na==0) {
- printf("\n") > ffbon;
- printf("[ angletypes ]\n") > ffbon;
- printf(";%4s %5s %5s %4s %8s %8s\n",
- "ai", "aj", "ak", "ft", "th0", "cth") > ffbon;
- printf(";%4s %5s %5s %4s %8s %8s\n",
- "", "", "", "", "(degr)", "(kj/mol/rad2)") > ffbon;
- ft=1;
- }
- if (debug) printf("; %s\n", $0);
- itt[na] = ai;
- jtt[na] = aj;
- ktt[na] = ak;
- tk[na] = kcal2kj(substr($0, 9,10)); # 9-18
- teq[na] = substr($0,19,10)+0; # 19-28
- acom[na]= substr($0,33,length); # rest
- printf("%5s %5s %5s %4d %8g %8g ; %s\n",
- itt[na],jtt[na],ktt[na], ft, teq[na], tk[na], acom[na]) > ffbon;
- na++;
-}
-
-type==tp_PDIH || type==tp_IDIH { # proper/improper dihedrals
- if (type==tp_PDIH && np==0) {
- ft=1;
- bFirstPdihDefine=1;
- printf("\n") > ffbon;
- printf("[ dihedraltypes ]\n") > ffbon;
- printf(";%4s %5s %5s %8s %8s %5s\n",
- "aj","ak", "ft","phi0","cp","mult") > ffbon;
- printf(";%4s %5s %5s %8s %8s %5s\n",
- "","", "","(degr)","(kJ/mol/rad)","") > ffbon;
- }
- if (type==tp_IDIH && ni==0) {
- ft=1; # we'll have to 'abuse' propers to correspond to Amber definition
- printf("\n") > ffbon;
- printf(";%4s %5s %5s %5s %5s %8s %8s %5s\n",
- "ai","aj","ak","al", "ft","q0","cq","mult") > ffbon;
- printf("; WARNING: using Gromacs propers to define Amber impropers\n") > ffbon;
- printf("; defining improper parameters for improper types\n") > ffbon;
- warning("using Gromacs propers to define Amber impropers\n");
- }
- if (debug) printf("; %s\n", $0);
- idivf = substr($0,12, 4)+0; # 12-15
- pk = kcal2kj(substr($0,16,15)); # 16-30
- phase = substr($0,31,15)+0; # 31-45
- pn = substr($0,46,15)+0; # 46-50
- com = substr($0,61,length); # rest
- if (type==tp_PDIH) {
- ipt[np] = ai;
- jpt[np] = aj;
- kpt[np] = ak;
- lpt[np] = al;
- p_idivf[np] = idivf;
- p_pk[np] = pk ;
- p_phase[np] = phase;
- p_pn[np] = pn ;
- p_com[np] = com ;
- np++;
- if ( ai=="X " && al=="X " ) {
- # this is the type of dihedral GROMACS can manage:
- printf("%5s %5s %5d %8g %8g %5d ; %s\n",
- aj,ak, ft, phase, pk/idivf, pn, com) > ffbon;
- if (pn<0) {
- printf(" ; WARNING: multiple dihedral types not supperted") > ffbon;
- warning("multiple dihedral types not supperted");
- }
- } else {
- # here we need a hack, since we cannot hava a dihedral type
- # depend on all four atom types in GROMACS...
- if (bFirstPdihDefine) {
- bFirstPdihDefine=0;
- printf("\n") > ffbon;
- printf("; defining dihedral parameters for four-atom dependent\n") > ffbon;
- printf("; dihedral types, which Gromacs does not handle by default\n") > ffbon;
- }
- print ai, aj, ak, al > ffpdihs;
- gsub(" ","_",ai); gsub(" ","_",aj); gsub(" ","_",ak); gsub(" ","_",al);
- if (pn<0 && ninc=="")
- ninc=1;
- printf("#define ad_%2s_%2s_%2s_%2s%1s%1s %8g %8g %5d %8g %8g %5d %s%s\n",
- ai,aj,ak,al, ninc?"_":" ", ninc,
- phase, pk/idivf, abs(pn), phase, pk/idivf, abs(pn),
- length(com)?"; ":"", com) > ffbon;
- if (pn<0)
- ninc++;
- else
- ninc="";
- }
- }
- if (type==tp_IDIH) {
- iit[ni] = ai;
- jit[ni] = aj;
- kit[ni] = ak;
- lit[ni] = al;
- i_idivf[ni] = idivf;
- i_pk[ni] = pk ;
- i_phase[ni] = phase;
- i_pn[ni] = pn ;
- i_com[ni] = com ;
- ni++;
- # here we need a hack, since we cannot hava a dihedral type
- # depend on all four atom types in GROMACS...
- print ai, aj, ak, al > ffidihs;
- gsub(" ","_",ai); gsub(" ","_",aj); gsub(" ","_",ak); gsub(" ","_",al);
- printf("#define ai_%2s_%2s_%2s_%2s %8g %8g %5d %8g %8g %5d %s%s\n",
- ai,aj,ak,al, pk,phase,pn,pk,phase,pn,
- length(com)?"; ":"",com) > ffbon;
- }
-}
-
-type==tp_HB { # H-bond 10-12 parameters
- if (nhb==0) {
- printf("\n") > ffnb;
- printf("; H-bond params not implemented\n") > ffnb;
- warning("H-bond params not implemented\n");
- bAllZero=1;
- }
- if (debug) printf("; %s\n", $0);
- a=substr($0, 11, 10)+0; # 11-20
- b=substr($0, 21, 10)+0; # 21-30
- if (a!=0 || b!=0) {
- printf("; WARNING: non-zero H-bond (10-12) parameters: %s %s %g %g\n",
- ai, aj, a, b) > ffnb;
- warning("non-zero H-bond (10-12) parameters:", ai, aj, a, b);
- bAllZero=0;
- }
- nhb++;
-}
-
-type==tp_EQ { # equivalent atom symbols 6-12 parameters
- if (neq==0) {
- printf("\n") > ffnb;
- printf("; LJ 6-12 equivalent atom symbols\n") > ffnb;
-
- }
- if (debug) printf("; %s\n", $0);
- anm=substr($0, 1, 2);
- for(i=1; i<length; i+=4) {
- eqat[neq]++;
- eqat[neq, int(i/4)]=substr($0, i, 2);
- }
- printf("; ") > ffnb;
- for(i=0; i<eqat[neq]; i++) {
- printf("%3s ", eqat[neq, i]) > ffnb;
- }
- printf("(%d)\n", eqat[neq]) > ffnb;
- neq++;
-}
-
-type==tp_LJ { # 6-12 potential parameters
- if ( !kindnb ) {
- label = $1;
- kindnb= $2;
- next;
- }
- if (nlj==0) {
- printf("\n") > ffnb;
- printf("; Define LJ 6-12 parameter types:\n") > ffnb;
- }
- if (debug) printf("; %s\n", $0);
- ljt[nlj] = substr($0, 3, 2) ; # 3- 4
- p1 = substr($0,11,20)+0; # 11-20
- p2 = substr($0,21,30)+0; # 21-30
- if (kindnb=="AC") {
- p = kcalpmolpA2kjpmolpnm(p2, 6);
- p2 = kcalpmolpA2kjpmolpnm(p1, 12);
- p1 = p;
- }
- if (kindnb=="RE") {
- p1 = A2nm(p1);
- p2 = kcal2kj(p2);
- }
- p3 = substr($0,31,40)+0; # 31-40
- if (debug) printf("; '%s' %10g %10g %10g\n",
- ljt[nlj], p1, p2, p3);
- printf("#define alj_%s %10g %10g\n", ljt[nlj], p1,p2) > ffnb;
- nlj++;
-}
-
-END {
- if (xxit) exit;
-
- # write forcefield main ff<name>.itp file
- # we do that here so we have the title...
- printf("#define _FF_%s\n", toupper(ffname)) > ffmain;
- printf("; Amber forcefield converted to Gromacs\n") > ffmain;
- printf("; from file %s\n", ARGV[1]) > ffmain;
- printf("; \n") > ffmain;
- printf("; %s\n", title) > ffmain;
- printf("\n") > ffmain;
- printf("[ defaults ]\n") > ffmain;
- if (kindnb=="AC") cr=1;
- if (kindnb=="RE") cr=2;
- printf("; %8s %10s %10s %10s %10s\n",
- "nbfunc", "comb-rule", "gen-pairs", "fudgeLJ", "fudgeQQ") > ffmain;
- printf("%10d %10d %10s %10.3g %10.3g\n", 1, cr, "no", 1.0, 1.0) > ffmain;
- printf("\n") > ffmain;
- printf("#include \"%s\"\n", ffnb) > ffmain;
- printf("#include \"%s\"\n", ffbon) > ffmain;
-
- # expand LJ parameters (using 'equivalent atoms')
- for(i=0; i<neq; i++) {
- eqnm = eqat[i, 0];
- if (debug) print i, eqnm, eqat[i];
- for(j=1; j<eqat[i]; j++)
- atlj[eqat[i, j]] = eqnm;
- }
- for(i=0; i<nat; i++) {
- anm=anms[i];
- if (!atlj[anm]) atlj[anm]=anm;
- if (debug) print i, anm, atlj[anm];
- }
- printf("\n") > ffnb;
- printf("[ atomtypes ]\n") > ffnb;
- if (kindnb=="AC")
- printf(";%4s%10s %4s %2s %-10s\n",
- "name", "mass", "q", "tp", "c6/c12") > ffnb;
- if (kindnb=="RE")
- printf(";%4s%10s %4s %2s %-10s\n",
- "name", "mass", "q", "tp", "sigma/epsilon") > ffnb;
- q=0;
- ptype="A";
- for(i=0; i<nat; i++) {
- anm=anms[i];
- printf("%4s %10.6g %4.2g %2s alj_%-3s ; %s\n",
- anm, amass[anm], q, ptype, atlj[anm], atcom[anm]) > ffnb;
- # here we write .atp
- printf("%4s %10.6g ; %s\n", anm, amass[anm], atcom[anm]) > ffatp;
- }
- printf("\n");
-
- printf("Found:\n");
- printf("# atoms: %s\n", nat);
- printf("# bonds: %s\n", nb);
- printf("# angles: %s\n", na);
- printf("# propers: %s\n", np);
- printf("# impropers: %s\n", ni);
- printf("# H-bonds (10-12): %s\n", nhb);
- printf("# equivalent 6-12: %s\n", neq);
- printf("# LJ (6-12): %s\n", nlj);
-
- printf("\n") > ffnb;
- printf("; Found:\n") > ffnb;
- printf("; # atoms: %s\n", nat) > ffnb;
- printf("; # H-bonds (10-12): %s\n", nhb) > ffnb;
- printf("; # equivalent 6-12: %s\n", neq) > ffnb;
- printf("; # LJ (6-12): %s\n", nlj) > ffnb;
- printf("\n") > ffbon;
- printf("; Found:\n") > ffbon;
- printf("; # bonds: %s\n", nb) > ffbon;
- printf("; # angles: %s\n", na) > ffbon;
- printf("; # propers: %s\n", np) > ffbon;
- printf("; # impropers: %s\n", ni) > ffbon;
-
- print_warn();
-}
-
-#last line
+++ /dev/null
-#!/bin/awk -f
-
-# reads Amber building block definition file(s) and converts to Gromacs
-# Version 1.1
-# Copyright (c) 2002
-# Anton Feenstra - Vrije Universiteit Amsterdam - The Netherlands
-
-function fill_with_underscores(s, n) {
- ss=s;
- while (length(ss)<n)
- ss=ss"_";
- return ss;
-}
-
-# keep track of which section ('card') of the residue entry we are reading
-# if tp<0, 'type' is incremented
-function next_type(tp) {
- if (tp>=0)
- type=tp;
- else
- type ++;
- if (debug) printf("Start reading section: %d = %s\n", type, section[type]);
-}
-
-# read list of dihedrals as defined in the ff files (written by amber2gmxff)
-function read_dihs(file, dihs) {
- ndihs=0;
- printf("Reading dihs from '%s'... ", file);
- while ( 0<getline <file ) {
- n=split($0,d);
- for(i=0; i<n; i++)
- dihs[ndihs,i]=d[i+1];
- ndihs++;
- }
- close(file);
- if (ndihs)
- printf("Read %d dihs\n", ndihs);
- else
- warning("could not read dihs");
- return ndihs;
-}
-
-# locate dihedrals in list and return number of matches
-function find_dih(ai, aj, ak, al, ndihs, dihs, found_dihs) {
- nmatch=0;
- dih[0]=ai; dih[1]=aj; dih[2]=ak; dih[3]=al;
- for(fi=0; fi<ndihs; fi++) {
- bMatch=1;
- if (debug) printf(".");
- for(fd=0; fd<=1; fd++) { # forward and backward comparison
- for(fj=0; fj<4 && bMatch; fj++)
- if (dihs[fi,fj]!="X")
- if (fd==0) # forward comparison
- bMatch = (dihs[fi,fj]==dih[fj]);
- else # backward comparison
- bMatch = (dihs[fi,fj]==dih[3-fj]);
- if (bMatch) {
- for(fj=0; fj<4; fj++)
- found_dihs[nmatch,fj]=dihs[fi,fj];
- nmatch++;
- }
- }
- }
- return nmatch;
-}
-
-# write list of dihedrals
-function dump_dihs(ndihs, dihs) {
- for(i=0; i<ndihs; i++) {
- printf("dih %d:", i);
- for(j=0; j<4; j++)
- printf(" %s", dihs[i,j]);
- printf("\n");
- }
-}
-
-function anm2atp(anmi, nat, anms, atps) {
- anm=anmi;
- gsub("-","",anm);
- gsub("\\+","",anm);
- for(ii=0; ii<nat; ii++)
- if (anm==anms[ii])
- return atps[ii];
-}
-
-function is_hydrogen(anr) {
- return index(isymbl[anr], "H")==1;
-}
-
-function swap_atoms(atnr1, atnr2) {
- # swap array entries:
- dum=igraph[atnr1]; igraph[atnr1]=igraph[atnr2]; igraph[atnr2]=dum;
- dum=isymbl[atnr1]; isymbl[atnr1]=isymbl[atnr2]; isymbl[atnr2]=dum;
- for(_j=0; _j<3; _j++)
- dum=zz[atnr1,_j]; zz[atnr1,_j]=zz[atnr2,_j]; zz[atnr2,_j] =dum;
- dum=theta[atnr1]; theta[atnr1] =theta[atnr2]; theta[atnr2] =dum;
- dum=chg[atnr1]; chg[atnr1] =chg[atnr2]; chg[atnr2] =dum;
- dum=allM[atnr1]; allM[atnr1] =allM[atnr2]; allM[atnr2] =dum;
- dum=allMtp[atnr1]; allMtp[atnr1]=allMtp[atnr2]; allMtp[atnr2]=dum;
- # swap atom number references in z-matrix definition:
- for(_i=0; _i<nat; _i++)
- for(_j=0; _j<nat; _j++)
- if (zz[_i,_j]==atnr1) zz[_i,_j]=atnr2;
- else if (zz[_i,_j]==atnr2) zz[_i,_j]=atnr1;
-}
-
-function warning(s) {
- printf("WARNING: %s\n", s);
- nwarn++;
-}
-
-function print_warn() {
- if (nwarn)
- printf("\nThere were %d warnings\n\n", nwarn);
-}
-
-function fatal_error(s) {
- if (nwarn) printf("(%d warnings pending)\n", nwarn);
- printf("\nFATAL ERROR: %s\n\n", s);
- xxit=1;
- exit -1;
-}
-
-BEGIN {
- if (ARGC < 2) {
- print("Usage:");
- print("amber2gmxrtp [ffname=<name>] [debug=1] all##.in");
- print("");
- print("Reads Amber residue database file (all##.in) and");
- print("writes Gromacs residue topology file (ff<name>.rtp),");
- print("Gromacs hydrogen database file (ff<name>.hdb),");
-# print("and Gromacs termini database files (ff<name>-[cn].tdb).");
- print("NOTE: For the time being, termini are implemented as");
- print("additional residues in the ff<name>.rtp as entries with");
- print("residue names '<res>-C' or '<res>-N'.");
- print("Default for <name> in output files is 'amber'.");
- print("");
- print("Use 'debug=1' for extremely verbose output.");
- print("");
- xxit=1;
- exit;
- }
- if ( !ffname ) ffname="amber";
- ffrtp = "ff" ffname ".rtp";
- ffhdb = "ff" ffname ".hdb";
- ffctdb = "ff" ffname "-c.tdb";
- ffntdb = "ff" ffname "-n.tdb";
- ffpdihs = ffname "-dihedrals.txt";
- ffidihs = ffname "-impropers.txt";
- nptps=read_dihs(ffpdihs, pdihtps);
- nitps=read_dihs(ffidihs, idihtps);
- if (debug) dump_dihs(nptps, pdihtps);
- if (debug) dump_dihs(nitps, idihtps);
- warning("NOTE: .tdb not implemented yet (dummy files will be written).");
- printf("Sending output to: %s\n", ffrtp);
- printf("; Amber forcefield converted to Gromacs\n") > ffrtp;
- printf("; \n") > ffrtp;
- type=0;
- nres=0; # residues
- nM=0;
- bM=0;
- # declare sections and names (order corresponds to amber file format)
- section[tp_RES_TIT=0]="residue title";
- section[tp_OUT_FIL=1]="output file";
- section[tp_RES_NAM=2]="residue name";
- section[tp_GEO_TYP=3]="geometry type";
- section[tp_LOO_CUT=4]="loop cutoff";
- section[tp_ATOMS =5]="atoms";
- section[tp_EXTRAS =6]="extras";
- section[tp_CHARGE =7]="charge";
- section[tp_LOOP =8]="loop";
- section[tp_IMP_DIH=9]="improper";
-
- # database types (third number on first line):
- db_tp[db_tp_UNI =1 ]="United-atom";
- db_tp[db_tp_UNI_NT =100]="United-atom, NH3+ terminal";
- db_tp[db_tp_UNI_CT =101]="United-atom, COO- terminal";
- db_tp[db_tp_ALL =2 ]="All-atom";
- db_tp[db_tp_ALL_NT =200]="All-atom, NH3+ terminal";
- db_tp[db_tp_ALL_CT =201]="All-atom, COO- terminal";
- db_tp[db_tp_OPLS =3 ]="OPLS United-atom";
- db_tp[db_tp_OPLS_NT=300]="OPLS United-atom, NH3+ terminal";
- db_tp[db_tp_OPLS_CT=301]="OPLS United-atom, COO- terminal";
- db_suf[db_tp_UNI]=db_suf[db_tp_ALL]=db_suf[db_tp_OPLS]="";
- db_suf[db_tp_UNI_NT]=db_suf[db_tp_ALL_NT]=db_suf[db_tp_OPLS_NT]="-N";
- db_suf[db_tp_UNI_CT]=db_suf[db_tp_ALL_CT]=db_suf[db_tp_OPLS_CT]="-C";
- db_pre[db_tp_UNI_NT]=db_pre[db_tp_ALL_NT]=db_pre[db_tp_OPLS_NT]=1;
- # marker for z-matrix entries that should be ignored:
- zz_NONE=-12345;
-
- # declare hydrogen database hydrogen addition types (Gromacs manual p 95)
- # atom orders:
- hotp[htp_o_IJK =0,0]=0; hotp[htp_o_IJK,1]=1; hotp[htp_o_IJK,2]=2;
- hotp[htp_o_JIK =1,0]=0; hotp[htp_o_JIK,1]=1; hotp[htp_o_JIK,2]=-1;
- hotp[htp_o_JKI =2,0]=0; hotp[htp_o_JKI,1]=-1; hotp[htp_o_JKI,2]=1;
- hotp[htp_o_JIKL=3,0]=0; hotp[htp_o_JIKL,1]=1;
- hotp[htp_o_JIKL,2]=-2; hotp[htp_o_JIKL,3]=-1;
- hotp[htp_o_I =4,0]=0;
- hotp[htp_o_ACE =5,0]=0; hotp[htp_o_ACE,1]=-1; hotp[htp_o_ACE,2]=-2;
- # the actual hydrogen types:
- htp_n[htp_NONE =-12345]=1;
- htp_n[htp_PLANE =1]=3; htp_o[htp_PLANE ]=htp_o_JIK;
- htp_n[htp_SINGLE =2]=3; htp_o[htp_SINGLE ]=htp_o_IJK;
- htp_n[htp_2PLANE =3]=3; htp_o[htp_2PLANE ]=htp_o_IJK;
- htp_n[htp_TTETRA =4]=3; htp_o[htp_TTETRA ]=htp_o_IJK;
- htp_n[htp_1TETRA =5]=4; htp_o[htp_1TETRA ]=htp_o_JIKL;
- htp_n[htp_2TETRA =6]=3; htp_o[htp_2TETRA ]=htp_o_JKI;
- htp_n[htp_WATER =7]=1; htp_o[htp_WATER ]=htp_o_I;
- htp_n[htp_CARBOX =8]=3; htp_o[htp_CARBOX ]=htp_o_IJK;
- htp_n[htp_CARBOXH=9]=3; htp_o[htp_CARBOXH]=htp_o_IJK;
-
- # write dummy .tdb files:
- print "[ null ]" > ffctdb;
- print "[ null ]" > ffntdb;
-
- # write empty xlateat.dat:
- print "0" > "xlateat.dat";
-}
-
-NR==1 {
- printf("Start reading file %s\n", FILENAME);
- printf("; from file %s\n", FILENAME) > ffrtp;
- idbgen = $1+0;
- irest = $2+0;
- itypf = $3+0;
- printf("; \n") > ffrtp;
- printf("; reading database: %s\n", db_tp[itypf]) > ffrtp;
- printf("; \n") > ffrtp;
- if (debug) print "dbgen:", idbgen, irest, itypf, db_suf[itypf];
- if (db_pre[itypf]) {
- warning("terminus: will ignore all bonds to preceding residue in this file");
- }
- next;
-}
-
-NR==2 {
- namdbf = $1;
- if (debug) print "dbname:", namdbf;
- next;
-}
-
-$1=="STOP" { # end of database file
- printf("Finished reading file %s\n", FILENAME);
- printf("; end of file %s\n", FILENAME) > ffrtp;
- NR=0;
- next;
-}
-
-$1=="DONE" {
- if (nat==0) fatal_error("no atoms for residue " resnm);
- if (nM) bM=1;
- # fix some exceptions:
- swap_first=0;
- kill_bond=0;
- if (resnm=="ACE" || resnm=="HOH") {
- # in 'ACE', HH31 comes before CH3, then HH32 and HH33 follow.
- # we need to change this to CH3, HH31-3.
- # in 'HOH', H1 comes before O. we need O, H1-2
- warning("EXCEPTION: swapping atoms "igraph[0]" and "igraph[1]" in residue "resnm);
- swap_first=1;
- # also, the bond to 'preceding' residue must go:
- warning("EXCEPTION: ignoring bond from "bonds[0,1]" to preceding residue in residue "resnm);
- kill_bond=1;
- }
- if (db_pre[itypf]) { # do we have no preceding residue (e.g. N-ter does not)
- kill_bond=1;
- }
- if (swap_first) {
- if (debug) print("SWAP FIRST");
- swap_atoms(0, 1);
- }
- if (kill_bond) {
- if (debug) print("KILL BOND");
- bonds[0,0]=-1;bonds[0,1]=-1;
- zz[0,0]=zz[0,1]=zz[0,2]=zz_NONE;
- zz[1,1]=zz[1,2]=zz_NONE;
- zz[2,2]=zz_NONE;
- }
- # write rtp
- printf("[ %s ]\n", resnmt) > ffrtp;
- printf(" [ atoms ]\n") > ffrtp;
- printf(";%4s %5s %8s %5s ; %s\n", "name", "type", "charge", "cg", "qtot") > ffrtp;
- cg=0;
- qt=0;
- for(i=0; i<nat; i++) {
- qt+=chg[i];
- printf("%5s %5s %8.3f %5d ; %g\n", igraph[i],isymbl[i], chg[i],cg++, qt) > ffrtp;
- }
-
- # write hdb
- nha=0;
- for(i=0; i<nat; i++) {
- if (is_hydrogen(i)) {
- hi[nha]=i-1;
- nhh[nha]=0;
- while (is_hydrogen(i) && i<nat) {
- i++;
- nhh[nha]++;
- }
- nha++;
- }
- }
- printf("%s\t%d\n", resnmt, nha) > ffhdb;
- for(i=0; i<nha; i++) {
- if (nhh[i]==3) { htp=htp_TTETRA; # three must be tetraeder
- } else if (theta[hi[i]+1]==109.5 ||
- theta[hi[i]+1]==109.47 ) { # tetraedrical or OH
- if (nhh[i]==2) {
- if (r[hi[i]+1]==1.01) htp=htp_TTETRA; # -NH2: (-NH3+ after deprotonation)
- else htp=htp_2TETRA; # C-CH2-C
- } else if (nhh[i]==1) { # either (tert)C-H or OH
- if (r[hi[i]+1]==0.96) htp=htp_SINGLE; # OH
- else htp=htp_1TETRA; # (tert)C-H
- }
- } else if (theta[hi[i]+1]==119.8 || # backbone N-H / arg N-H2
- theta[hi[i]+1]==118.5 || # arginine N-H
- ( theta[hi[i]+1]>=120.0 &&
- theta[hi[i]+1]<=126.0 ) ) { # his/trp N-H's
- if (nhh[i]==1) htp=htp_PLANE;
- else if (nhh[i]==2) htp=htp_2PLANE;
- } else if (theta[hi[i]+1]==109.47 || # OH
- theta[hi[i]+1]==118.5 ||
- theta[hi[i]+1]==127.0 || # nucl ac.
- theta[hi[i]+1]==117.7 || # nucl ac.
- theta[hi[i]+1]==117.36 || # nucl ac.
- theta[hi[i]+1]==116.77 || # nucl ac.
- theta[hi[i]+1]==114.97 || # nucl ac.
- theta[hi[i]+1]==107.0 || # nucl ac.
- theta[hi[i]+1]==113.0 ||
- theta[hi[i]+1]== 96.0 ) { # backbone N-H
- htp=htp_SINGLE;
- } else if (theta[hi[i]+1]==101.43) {
- htp=htp_WATER;
- } else if (theta[hi[i]+1]== 60.0) { # PRO-N (-NH2-)
- htp=htp_2TETRA;
- } else
- htp=htp_NONE;
- if (debug) printf("i:%d hi:%d(%s) nhh:%d htp:%d htpn:%d theta:%g r:%g\n",
- i, hi[i], igraph[hi[i]], nhh[i], htp, htp_n[htp],
- theta[hi[i]+1], r[hi[i]+1]);
- printf("\t%d\t%d", nhh[i], htp) > ffhdb;
- # more exceptions:
- if (resnm=="ACE" && htp==htp_TTETRA)
- htpo=htp_o_ACE;
- else
- htpo=htp_o[htp];
- for(j=0; j<htp_n[htp]; j++) {
- k=hotp[htpo,j];
- if (debug) printf("j:%d htp:%d htp_o:%d k:%d",
- j, htp, htpo, k);
- if (k==0) # atom 'i': bonded atom
- l = igraph[hi[i]];
- else if (k<0) { # atoms 'ijk': reference atoms upstream
- l = "";
- # search other non-hydrogen z-matrix entries for 'this' atom number:
- for(jj=0; jj<3 && k<0; jj++)
- for(ii=hi[i]+1; ii<nat && k<0; ii++) {
- if (debug) printf("[ii:%d H:%d jj:%d zz:%d]",
- ii, is_hydrogen(ii), jj, zz[ii,jj]);
- if (!is_hydrogen(ii) && zz[ii,jj]!=zz_NONE && zz[ii,jj]==hi[i]) {
- if (debug) printf(":%s", igraph[ii]);
- k++; # k<0, we count up to zero
- }
- }
- if (k==0)
- l = igraph[ii-1];
- else {
- if (nl) { # finally, check 'loops':
- if (debug) printf(" nl:%d", nl);
- for(ii=0; ii<nl; ii++)
- for(jj=0; jj<2; jj++) {
- if (debug) printf(" %s", loops[ii,jj]);
- if (loops[ii,jj]==igraph[hi[i]])
- l = loops[ii,1-jj];
- }
- if (debug) printf("\n");
- }
- if (l=="")
- fatal_error("no bonded atom found for atom "igraph[hi[i]]" ("hi[i]+1") in residue "resnmt);
- }
- } else { # atoms 'ijk': reference atoms downstream (take from z-matrix)
- if (zz[hi[i],k-1]<0) # atom in previous residue, use 'allM':
- l = "-"allM[nM+zz[hi[i],k-1]];
- else # atom in this residue:
- l = igraph[zz[hi[i],k-1]];
- }
- if (debug) printf(" l:%s\n",l);
- printf("\t%s", l) > ffhdb;
- }
- printf("\n") > ffhdb;
- }
- # done hdb
-
- if (nat>1) { # bonds etc. do not make sense for a single atom:
-
- if (nb==0) fatal_error("no bonds for residue " resnmt);
- printf(" [ bonds ]\n") > ffrtp;
- printf(";%4s %5s\n", "ai", "aj") > ffrtp;
- ignb=0;
- for(i=0; i<nb; i++) {
- if (bonds[i,0]<0 && bonds[i,1]<0)
- ignb++;
- else {
- if (bonds[i,0]=="") bonds[i,0]="-"allM[nM-1];
- printf("%5s %5s\n", bonds[i,0], bonds[i,1]) > ffrtp;
- }
- }
- nb-=ignb;
- if (np>0) {
- bFirstPdih=1;
- for(i=0; i<np; i++) {
- # expand 'negative' atom id's:
- for(j=0; j<4; j++) {
- atp = pdihsatp[i,j]+0;
- if (atp<0) {
- # fix atom name:
- pdihs[i,j] = "-"allM[nM+atp];
- # fix atom type:
- pdihsatp[i,j] = allMtp[nM+atp];
- }
- }
- # find number of pre-defined 4-atom based dihedral defines, if zero
- # we use implicit (2-atom based) dihedrals (which need not be listed):
- n = find_dih(pdihsatp[i,0],pdihsatp[i,1],pdihsatp[i,2],pdihsatp[i,3],
- nptps, pdihtps, null);
- for(k=0; k<n || (n==0 && k==0); k++)
- if ( n ) {
- if (bFirstPdih) {
- bFirstPdih=0;
- printf(" [ dihedrals ]\n") > ffrtp;
- printf(";%4s %5s %5s %5s\n", "ai", "aj", "ak", "al") > ffrtp;
- }
- for(j=0; j<4; j++)
- printf("%5s ", pdihs[i,j]) > ffrtp;
- printf(" ad") > ffrtp;
- for(j=0; j<4; j++)
- printf("_%2s", fill_with_underscores(pdihsatp[i,j],2) ) > ffrtp;
- if ( n>0 ) printf("_%d", k+1) > ffrtp;
- printf("\n") > ffrtp;
- }
- }
- }
- if (ni) {
- printf(" [ impropers ]\n") > ffrtp;
- printf(";%4s %5s %5s %5s\n", "ai", "aj", "ak", "al") > ffrtp;
- for(i=0; i<ni; i++) {
- for(j=0; j<4; j++) {
- if (idihs[i,j]=="-M") idihs[i,j]="-"allM[nM-1];
- if (idihs[i,j]=="+M") idihs[i,j]="+"allM[0];
- atps[j] = anm2atp(idihs[i,j], nat, igraph, isymbl);
- printf("%5s ", idihs[i,j]) > ffrtp;
- }
- if (debug) {
- printf("%s %s %s %s ", atps[0], atps[1], atps[2], atps[3]);
- printf("%s %s %s %s ", idihs[i,0], idihs[i,1], idihs[i,2], idihs[i,3]);
- }
- n = find_dih(atps[0], atps[1], atps[2], atps[3], nitps, idihtps, fdihs);
- if (debug) printf("\n");
- if (n==1) {
- printf(" ai") > ffrtp;
- for(j=0; j<4; j++)
- printf("_%2s", fill_with_underscores(fdihs[0,j],2) ) > ffrtp;
- } else
- warning((n?"multiple ("n")":"no")" idih definition for "atps[0]" "atps[1]" "atps[2]" "atps[3]);
- printf("\n") > ffrtp;
-
- }
- }
- }
- printf("; end residue %s: %d atoms, %d bonds, %d pdihs, %d idihs\n",
- resnmt, nat, nb, np, ni) > ffrtp;
- printf("\n") > ffrtp;
-
- # clean up
- for(i in xlate) delete xlate[i];
-
- if (debug) print "done.";
- next_type(tp_RES_TIT);
- next;
-}
-
-type==tp_RES_TIT { # title
- # initialize per-residue variables
- nat=0;
- nb=0;
- nl=0;
- ni=0;
- np=0;
- # read this section
- title = $0;
- gsub(" *", " ", title);
- if (debug) print "title:", title;
- printf("; %s\n", title) > ffrtp;
- printf("; \n") > ffrtp;
- next_type(-1);
- next;
-}
-
-type==tp_OUT_FIL { # file
- file = $0;
- if (debug) print "file:", file;
- next_type(-1);
- next;
-}
-
-type==tp_RES_NAM { # residue name
- resnm = $1;
- intx = $2;
- kform = $3+0;
- if (debug) print "residue:", nres, resnm, intx, kform;
- if (length(resnm)>3) {
- warning("Residue name '"resnm"' more than three characters long");
- }
- # add possible suffix for terminus:
- resnmt=resnm db_suf[itypf];
-
- printf("Residue: %d %s (%s)\n", nres, title, resnmt);
-
- resnms[nres]=resnm;
- nres++;
-
- next_type(-1);
- next;
-}
-
-type==tp_GEO_TYP { # geometry
- ifixc = $1;
- iomit = $2;
- isymdu = $3;
- ipos = $4;
- if (debug) print "geometry:", ifixc, iomit, isymdu, ipos;
- next_type(-1);
- next;
-}
-
-type==tp_LOO_CUT { # cut
- cut=$1+0;
- if (debug) print "cut:", cut;
- next_type(-1);
- next;
-}
-
-type==tp_ATOMS && NF==0 { # end of atoms
- ndum=0;
- next_type(-1);
- next;
-}
-
-type==tp_ATOMS { # atoms
- if ($2=="DUMM") {
- ndum++;
- } else {
- i = $1-ndum-1;
- igraph[i] = $2;
- isymbl[i] = $3;
- itree = $4;
- zz[i,0] = $5-ndum-1;
- zz[i,1] = $6-ndum-1;
- zz[i,2] = $7-ndum-1;
- r[i] = $8+0;
- theta[i] = $9+0;
- phi = $10+0;
- chg[i] = $11+0;
- nat++;
- # fix hydrogen atom numbering:
- if (is_hydrogen(i) && length(igraph[i])>length_heavy) {
- hnum++;
- igr=substr(igraph[i], 1, length_heavy) hnum;
- if (igr!=igraph[i]) {
- # store translated atom names:
- if (debug) print "Xlate:", i, "'"igraph[i]"'", "'"isymbl[i]"'",
- length_heavy, "'"igr"'";
- xlate[igraph[i]]=igr;
- igraph[i]=igr;
- }
- } else {
- length_heavy=length(igraph[i])
- hnum=0;
- }
- if (itree=="M" && !bM) {
- allM[nM] = igraph[i];
- allMtp[nM] = isymbl[i];
- nM++;
- }
- # add bonds
- bonds[nb, 0]=igraph[zz[i,0]];
- bonds[nb, 1]=igraph[i];
- nb++;
- # angles are automatic
- # add proper dihs
- pdihs[np, 0]=igraph[i];
- pdihs[np, 1]=igraph[zz[i,0]];
- pdihs[np, 2]=igraph[zz[i,1]];
- pdihs[np, 3]=igraph[zz[i,2]];
- pdihsatp[np, 0]=isymbl[i];
- pdihsatp[np, 1]= zz[i,0]<0 ? zz[i,0] : isymbl[zz[i,0]];
- pdihsatp[np, 2]= zz[i,1]<0 ? zz[i,1] : isymbl[zz[i,1]];
- pdihsatp[np, 3]= zz[i,2]<0 ? zz[i,2] : isymbl[zz[i,2]];
- np++;
- if (debug) printf("atom: %d %s %s %s %d %d %d %g %g %g %g\n",
- i+1, igraph[i], isymbl[i], itree,
- zz[i,0], zz[i,1], zz[i,2], r[i], theta[i], phi, chg[i]);
- }
-}
-
-type==tp_EXTRAS { # extra's
- if (debug) print "extra:", $0;
- for(i=tp_CHARGE; i<=tp_IMP_DIH; i++) {
- if (toupper(section[i]) == $1) {
- next_type(i);
- next;
- }
- }
-}
-
-type>tp_EXTRAS && NF==0 { # end of an extra's section
- if (iq && iq!=nat)
- warning("ERROR: # charges ("iq") and # atoms ("nat") differ");
- iq=0;
- next_type(tp_EXTRAS);
- next;
-}
-
-type==tp_CHARGE { # charge
- for(i=1; i<=NF; i++) {
- chg[iq] = $i;
- iq++;
- }
- if (debug) print "charges:", iq;
-}
-
-type==tp_LOOP { # loop
- for(i=1; i<=2; i++) bonds[nb, i-1] = xlate[$i] ? xlate[$i] : $i;
- nb++;
- for(i=1; i<=2; i++) loops[nl, i-1] = xlate[$i] ? xlate[$i] : $i;
- nl++;
-}
-
-type==tp_IMP_DIH { # improper
- for(i=1; i<=4; i++) idihs[ni, i-1] = xlate[$i] ? xlate[$i] : $i;
- ni++;
-}
-
-END {
- if (xxit) exit;
- printf("Found %d residues\n", nres);
- print_warn();
- printf("; Found %d residues\n", nres) > ffrtp;
-}
-
-#last line
+++ /dev/null
-#!/usr/bin/awk -f
-
-BEGIN { pre=""; }
-/^\[/ { pre=""; }
-/pairs/ { pre=";"; }
-
-{ print pre$0; }
-
-#last line
+++ /dev/null
- BR 79.9 ; bromine
- C 12.01 ; sp2 C carbonyl group
- CA 12.01 ; sp2 C pure aromatic (benzene)
- CB 12.01 ; sp2 aromatic C, 5&6 membered ring junction
- CC 12.01 ; sp2 aromatic C, 5 memb. ring HIS
- CK 12.01 ; sp2 C 5 memb.ring in purines
- CM 12.01 ; sp2 C pyrimidines in pos. 5 & 6
- CN 12.01 ; sp2 C aromatic 5&6 memb.ring junct.(TRP)
- CQ 12.01 ; sp2 C in 5 mem.ring of purines between 2 N
- CR 12.01 ; sp2 arom as CQ but in HIS
- CT 12.01 ; sp3 aliphatic C
- CV 12.01 ; sp2 arom. 5 memb.ring w/1 N and 1 H (HIS)
- CW 12.01 ; sp2 arom. 5 memb.ring w/1 N-H and 1 H (HIS)
- C* 12.01 ; sp2 arom. 5 memb.ring w/1 subst. (TRP)
- C0 40.08 ; calcium
- F 19 ; fluorine
- H 1.008 ; H bonded to nitrogen atoms
- HC 1.008 ; H aliph. bond. to C without electrwd.group
- H1 1.008 ; H aliph. bond. to C with 1 electrwd. group
- H2 1.008 ; H aliph. bond. to C with 2 electrwd.groups
- H3 1.008 ; H aliph. bond. to C with 3 eletrwd.groups
- HA 1.008 ; H arom. bond. to C without elctrwd. groups
- H4 1.008 ; H arom. bond. to C with 1 electrwd. group
- H5 1.008 ; H arom. bond. to C with 2 electrwd. groups
- HO 1.008 ; hydroxyl group
- HS 1.008 ; hydrogen bonded to sulphur
- HW 1.008 ; H in TIP3P water
- HP 1.008 ; H bonded to C next to positively charged gr
- I 126.9 ; iodine
- IM 35.45 ; assumed to be Cl-
- IP 22.99 ; assumed to be Na+
- IB 131 ; 'big ion w/ waters' for vacuum (Na+, 6H2O)
- MG 24.305 ; magnesium
- N 14.01 ; sp2 nitrogen in amide groups
- NA 14.01 ; sp2 N in 5 memb.ring w/H atom (HIS)
- NB 14.01 ; sp2 N in 5 memb.ring w/LP (HIS,ADE,GUA)
- NC 14.01 ; sp2 N in 6 memb.ring w/LP (ADE,GUA)
- N2 14.01 ; sp2 N in amino groups
- N3 14.01 ; sp3 N for charged amino groups (Lys, etc)
- N* 14.01 ; sp2 N
- O 16 ; carbonyl group oxygen
- OW 16 ; oxygen in TIP3P water
- OH 16 ; oxygen in hydroxyl group
- OS 16 ; ether and ester oxygen
- O2 16 ; carboxyl and phosphate group oxygen
- P 30.97 ; phosphate
- S 32.06 ; sulphur in disulfide linkage
- SH 32.06 ; sulphur in cystine
- CU 63.55 ; copper
- FE 55 ; iron
- Li 6.94 ; lithium
- K 39.1 ; potassium
- Rb 85.47 ; rubidium
- Cs 132.91 ; cesium
+++ /dev/null
-ALA 3
- 1 1 N -C CA
- 1 5 CA N C CB
- 3 4 CB CA N
-GLY 2
- 1 1 N -C CA
- 2 6 CA C N
-SER 4
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB OG CA
- 1 2 OG CB CA
-THR 5
- 1 1 N -C CA
- 1 5 CA N C CB
- 1 5 CB CA OG1 CG2
- 3 4 CG2 CB CA
- 1 2 OG1 CB CA
-LEU 6
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 5 CG CB CD2 CD1
- 3 4 CD1 CG CB
- 3 4 CD2 CG CB
-ILE 6
- 1 1 N -C CA
- 1 5 CA N C CB
- 1 5 CB CA CG1 CG2
- 3 4 CG2 CB CA
- 2 6 CG1 CD1 CB
- 3 4 CD1 CG1 CB
-VAL 5
- 1 1 N -C CA
- 1 5 CA N C CB
- 1 5 CB CA CG2 CG1
- 3 4 CG1 CB CA
- 3 4 CG2 CB CA
-ASN 4
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 3 ND2 CG CB
-GLN 5
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
- 2 3 NE2 CD CG
-ARG 8
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
- 2 6 CD NE CG
- 1 1 NE CD CZ
- 2 3 NH1 CZ NE
- 2 3 NH2 CZ NE
-HID 6
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 ND1 CG CE1
- 1 1 CE1 ND1 NE2
- 1 1 CD2 NE2 CG
-HIE 6
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 CE1 ND1 NE2
- 1 1 NE2 CE1 CD2
- 1 1 CD2 NE2 CG
-HIP 7
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 ND1 CG CE1
- 1 1 CE1 ND1 NE2
- 1 1 NE2 CE1 CD2
- 1 1 CD2 NE2 CG
-TRP 9
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 CD1 CG NE1
- 1 1 NE1 CD1 CE2
- 1 1 CZ2 CE2 CH2
- 1 1 CH2 CZ2 CZ3
- 1 1 CZ3 CH2 CE3
- 1 1 CE3 CZ3 CD2
-PHE 8
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 CD1 CG CE1
- 1 1 CE1 CD1 CZ
- 1 1 CZ CE1 CE2
- 1 1 CE2 CZ CD2
- 1 1 CD2 CE2 CG
-TYR 8
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 CD1 CG CE1
- 1 1 CE1 CD1 CZ
- 1 2 OH CZ CE1
- 1 1 CE2 CZ CD2
- 1 1 CD2 CE2 CG
-GLU 4
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
-ASP 3
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
-LYS 7
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
- 2 6 CD CE CG
- 2 6 CE NZ CD
- 3 4 NZ CE CD
-LYN 7
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
- 2 6 CD CE CG
- 2 6 CE NZ CD
- 2 4 NZ CE CD
-PRO 4
- 2 6 CD CG N
- 2 6 CG CB CD
- 2 6 CB CA CG
- 1 5 CA N O C
-CYS 4
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB SG CA
- 1 2 SG CB CA
-CYM 3
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB SG CA
-CYX 3
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB SG CA
-MET 5
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG SD CB
- 3 4 CE SD CG
-ACE 1
- 3 4 CH3 C O
-NME 2
- 1 1 N -C CH3
- 3 4 CH3 N -C
-NHE 1
- 2 3 N -C -N
-HOH 1
- 2 7 O
-ASH 4
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 2 OD2 CG CB
-GLH 5
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
- 1 2 OE2 CD CG
-CIP 0
-CIM 0
-ALA-C 3
- 1 1 N -C CA
- 1 5 CA N C CB
- 3 4 CB CA N
-GLY-C 2
- 1 1 N -C CA
- 2 6 CA C N
-SER-C 4
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB OG CA
- 1 2 OG CB CA
-THR-C 5
- 1 1 N -C CA
- 1 5 CA N C CB
- 1 5 CB CA OG1 CG2
- 3 4 CG2 CB CA
- 1 2 OG1 CB CA
-LEU-C 6
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 5 CG CB CD2 CD1
- 3 4 CD1 CG CB
- 3 4 CD2 CG CB
-ILE-C 6
- 1 1 N -C CA
- 1 5 CA N C CB
- 1 5 CB CA CG1 CG2
- 3 4 CG2 CB CA
- 2 6 CG1 CD1 CB
- 3 4 CD1 CG1 CB
-VAL-C 5
- 1 1 N -C CA
- 1 5 CA N C CB
- 1 5 CB CA CG2 CG1
- 3 4 CG1 CB CA
- 3 4 CG2 CB CA
-ASN-C 4
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 3 ND2 CG CB
-GLN-C 5
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
- 2 3 NE2 CD CG
-ARG-C 8
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
- 2 6 CD NE CG
- 1 1 NE CD CZ
- 2 3 NH1 CZ NE
- 2 3 NH2 CZ NE
-HID-C 6
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 ND1 CG CE1
- 1 1 CE1 ND1 NE2
- 1 1 CD2 NE2 CG
-HIE-C 6
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 CE1 ND1 NE2
- 1 1 NE2 CE1 CD2
- 1 1 CD2 NE2 CG
-HIP-C 7
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 ND1 CG CE1
- 1 1 CE1 ND1 NE2
- 1 1 NE2 CE1 CD2
- 1 1 CD2 NE2 CG
-TRP-C 9
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 CD1 CG NE1
- 1 1 NE1 CD1 CE2
- 1 1 CZ2 CE2 CH2
- 1 1 CH2 CZ2 CZ3
- 1 1 CZ3 CH2 CE3
- 1 1 CE3 CZ3 CD2
-PHE-C 8
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 CD1 CG CE1
- 1 1 CE1 CD1 CZ
- 1 1 CZ CE1 CE2
- 1 1 CE2 CZ CD2
- 1 1 CD2 CE2 CG
-TYR-C 8
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 CD1 CG CE1
- 1 1 CE1 CD1 CZ
- 1 2 OH CZ CE1
- 1 1 CE2 CZ CD2
- 1 1 CD2 CE2 CG
-GLU-C 4
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
-ASP-C 3
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
-LYS-C 7
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
- 2 6 CD CE CG
- 2 6 CE NZ CD
- 3 4 NZ CE CD
-PRO-C 4
- 2 6 CD CG N
- 2 6 CG CB CD
- 2 6 CB CA CG
- 1 5 CA N O C
-CYS-C 4
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB SG CA
- 1 2 SG CB CA
-CYX-C 3
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB SG CA
-MET-C 5
- 1 1 N -C CA
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG SD CB
- 3 4 CE SD CG
-ALA-N 3
- 3 4 N - -
- 1 5 CA N C CB
- 3 4 CB CA N
-GLY-N 2
- 3 4 N - -
- 2 6 CA C N
-SER-N 4
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB OG CA
- 1 2 OG CB CA
-THR-N 5
- 3 4 N - -
- 1 5 CA N C CB
- 1 5 CB CA OG1 CG2
- 3 4 CG2 CB CA
- 1 2 OG1 CB CA
-LEU-N 6
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 5 CG CB CD2 CD1
- 3 4 CD1 CG CB
- 3 4 CD2 CG CB
-ILE-N 6
- 3 4 N - -
- 1 5 CA N C CB
- 1 5 CB CA CG1 CG2
- 3 4 CG2 CB CA
- 2 6 CG1 CD1 CB
- 3 4 CD1 CG1 CB
-VAL-N 5
- 3 4 N - -
- 1 5 CA N C CB
- 1 5 CB CA CG2 CG1
- 3 4 CG1 CB CA
- 3 4 CG2 CB CA
-ASN-N 4
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 3 ND2 CG CB
-GLN-N 5
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
- 2 3 NE2 CD CG
-ARG-N 8
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
- 2 6 CD NE CG
- 1 1 NE CD CZ
- 2 3 NH1 CZ NE
- 2 3 NH2 CZ NE
-HID-N 6
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 ND1 CG CE1
- 1 1 CE1 ND1 NE2
- 1 1 CD2 NE2 CG
-HIE-N 6
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 CE1 ND1 NE2
- 1 1 NE2 CE1 CD2
- 1 1 CD2 NE2 CG
-HIP-N 7
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 ND1 CG CE1
- 1 1 CE1 ND1 NE2
- 1 1 NE2 CE1 CD2
- 1 1 CD2 NE2 CG
-TRP-N 9
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 CD1 CG NE1
- 1 1 NE1 CD1 CE2
- 1 1 CZ2 CE2 CH2
- 1 1 CH2 CZ2 CZ3
- 1 1 CZ3 CH2 CE3
- 1 1 CE3 CZ3 CD2
-PHE-N 8
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 CD1 CG CE1
- 1 1 CE1 CD1 CZ
- 1 1 CZ CE1 CE2
- 1 1 CE2 CZ CD2
- 1 1 CD2 CE2 CG
-TYR-N 8
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
- 1 1 CD1 CG CE1
- 1 1 CE1 CD1 CZ
- 1 2 OH CZ CE1
- 1 1 CE2 CZ CD2
- 1 1 CD2 CE2 CG
-GLU-N 4
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
-ASP-N 3
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
-LYS-N 7
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG CD CB
- 2 6 CD CE CG
- 2 6 CE NZ CD
- 3 4 NZ CE CD
-PRO-N 5
- 2 6 N CD -
- 2 6 CD CG N
- 2 6 CG CB CD
- 2 6 CB CA CG
- 1 5 CA N O C
-CYS-N 4
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB SG CA
- 1 2 SG CB CA
-CYX-N 3
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB SG CA
-MET-N 5
- 3 4 N - -
- 1 5 CA N C CB
- 2 6 CB CG CA
- 2 6 CG SD CB
- 3 4 CE SD CG
+++ /dev/null
-#define _FF_AMBER
-; Amber forcefield converted to Gromacs
-; from file /usr/slocal/amber6/dat/parm98.dat
-;
-; PARM94 for DNA, RNA and proteins with TIP3P Water. USE SCEE=1.2 in energy progs
-
-[ defaults ]
-; nbfunc comb-rule gen-pairs fudgeLJ fudgeQQ
- 1 2 no 1 1
-
-#include "ffambernb.itp"
-#include "ffamberbon.itp"
+++ /dev/null
-; Amber forcefield converted to Gromacs
-;
-; from file /usr/slocal/amber6/dat/all_amino94.in
-;
-; reading database: All-atom
-;
-; ALANINE
-;
-[ ALA ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT 0.034 2 ; -0.1101
- HA H1 0.082 3 ; -0.0278
- CB CT -0.182 4 ; -0.2103
- HB1 HC 0.060 5 ; -0.15
- HB2 HC 0.060 6 ; -0.0897
- HB3 HC 0.060 7 ; -0.0294
- C C 0.597 8 ; 0.5679
- O O -0.568 9 ; 0
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB HB3
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
-; end residue ALA: 10 atoms, 10 bonds, 10 pdihs, 2 idihs
-
-; GLYCINE
-;
-[ GLY ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT -0.025 2 ; -0.169
- HA1 H1 0.070 3 ; -0.0992
- HA2 H1 0.070 4 ; -0.0294
- C C 0.597 5 ; 0.5679
- O O -0.568 6 ; 1.11022e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA1
- CA HA2
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
-; end residue GLY: 7 atoms, 7 bonds, 7 pdihs, 2 idihs
-
-; SERINE
-;
-[ SER ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT -0.025 2 ; -0.1687
- HA H1 0.084 3 ; -0.0844
- CB CT 0.212 4 ; 0.1273
- HB1 H1 0.035 5 ; 0.1625
- HB2 H1 0.035 6 ; 0.1977
- OG OH -0.655 7 ; -0.4569
- HG HO 0.427 8 ; -0.0294
- C C 0.597 9 ; 0.5679
- O O -0.568 10 ; 1.11022e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB OG
- OG HG
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
-; end residue SER: 11 atoms, 11 bonds, 11 pdihs, 2 idihs
-
-; THREONINE
-;
-[ THR ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT -0.039 2 ; -0.1827
- HA H1 0.101 3 ; -0.082
- CB CT 0.365 4 ; 0.2834
- HB H1 0.004 5 ; 0.2877
- CG2 CT -0.244 6 ; 0.0439
- HG21 HC 0.064 7 ; 0.1081
- HG22 HC 0.064 8 ; 0.1723
- HG23 HC 0.064 9 ; 0.2365
- OG1 OH -0.676 10 ; -0.4396
- HG1 HO 0.410 11 ; -0.0294
- C C 0.597 12 ; 0.5679
- O O -0.568 13 ; 1.11022e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB
- CB CG2
- CG2 HG21
- CG2 HG22
- CG2 HG23
- CB OG1
- OG1 HG1
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
-; end residue THR: 14 atoms, 14 bonds, 14 pdihs, 2 idihs
-
-; LEUCINE
-;
-[ LEU ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT -0.052 2 ; -0.1956
- HA H1 0.092 3 ; -0.1034
- CB CT -0.110 4 ; -0.2136
- HB1 HC 0.046 5 ; -0.1679
- HB2 HC 0.046 6 ; -0.1222
- CG CT 0.353 7 ; 0.2309
- HG HC -0.036 8 ; 0.1948
- CD1 CT -0.412 9 ; -0.2173
- HD11 HC 0.100 10 ; -0.1173
- HD12 HC 0.100 11 ; -0.0173
- HD13 HC 0.100 12 ; 0.0827
- CD2 CT -0.412 13 ; -0.3294
- HD21 HC 0.100 14 ; -0.2294
- HD22 HC 0.100 15 ; -0.1294
- HD23 HC 0.100 16 ; -0.0294
- C C 0.597 17 ; 0.5679
- O O -0.568 18 ; 0
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG
- CG CD1
- CD1 HD11
- CD1 HD12
- CD1 HD13
- CG CD2
- CD2 HD21
- CD2 HD22
- CD2 HD23
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
-; end residue LEU: 19 atoms, 19 bonds, 19 pdihs, 2 idihs
-
-; ISOLEUCINE
-;
-[ ILE ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT -0.060 2 ; -0.2035
- HA H1 0.087 3 ; -0.1166
- CB CT 0.130 4 ; 0.0137
- HB HC 0.019 5 ; 0.0324
- CG2 CT -0.320 6 ; -0.288
- HG21 HC 0.088 7 ; -0.1998
- HG22 HC 0.088 8 ; -0.1116
- HG23 HC 0.088 9 ; -0.0234
- CG1 CT -0.043 10 ; -0.0664
- HG11 HC 0.024 11 ; -0.0428
- HG12 HC 0.024 12 ; -0.0192
- CD1 CT -0.066 13 ; -0.0852
- HD11 HC 0.019 14 ; -0.0666
- HD12 HC 0.019 15 ; -0.048
- HD13 HC 0.019 16 ; -0.0294
- C C 0.597 17 ; 0.5679
- O O -0.568 18 ; 0
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB
- CB CG2
- CG2 HG21
- CG2 HG22
- CG2 HG23
- CB CG1
- CG1 HG11
- CG1 HG12
- CG1 CD1
- CD1 HD11
- CD1 HD12
- CD1 HD13
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
-; end residue ILE: 19 atoms, 19 bonds, 19 pdihs, 2 idihs
-
-; VALINE
-;
-[ VAL ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT -0.087 2 ; -0.2313
- HA H1 0.097 3 ; -0.1344
- CB CT 0.298 4 ; 0.1641
- HB HC -0.030 5 ; 0.1344
- CG1 CT -0.319 6 ; -0.1848
- HG11 HC 0.079 7 ; -0.1057
- HG12 HC 0.079 8 ; -0.0266
- HG13 HC 0.079 9 ; 0.0525
- CG2 CT -0.319 10 ; -0.2667
- HG21 HC 0.079 11 ; -0.1876
- HG22 HC 0.079 12 ; -0.1085
- HG23 HC 0.079 13 ; -0.0294
- C C 0.597 14 ; 0.5679
- O O -0.568 15 ; 1.11022e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB
- CB CG1
- CG1 HG11
- CG1 HG12
- CG1 HG13
- CB CG2
- CG2 HG21
- CG2 HG22
- CG2 HG23
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
-; end residue VAL: 16 atoms, 16 bonds, 16 pdihs, 2 idihs
-
-; ASPARAGINE
-;
-[ ASN ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT 0.014 2 ; -0.1295
- HA H1 0.105 3 ; -0.0247
- CB CT -0.204 4 ; -0.2288
- HB1 HC 0.080 5 ; -0.1491
- HB2 HC 0.080 6 ; -0.0694
- CG C 0.713 7 ; 0.6436
- OD1 O -0.593 8 ; 0.0505
- ND2 N -0.919 9 ; -0.8686
- HD21 H 0.420 10 ; -0.449
- HD22 H 0.420 11 ; -0.0294
- C C 0.597 12 ; 0.5679
- O O -0.568 13 ; 0
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG OD1
- CG ND2
- ND2 HD21
- ND2 HD22
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
- CB ND2 CG OD1 ai_X__X__C__O_
- CG HD21 ND2 HD22 ai_X__X__N__H_
-; end residue ASN: 14 atoms, 14 bonds, 14 pdihs, 4 idihs
-
-; GLUTAMINE
-;
-[ GLN ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT -0.003 2 ; -0.1469
- HA H1 0.085 3 ; -0.0619
- CB CT -0.004 4 ; -0.0655
- HB1 HC 0.017 5 ; -0.0484
- HB2 HC 0.017 6 ; -0.0313
- CG CT -0.065 7 ; -0.0958
- HG1 HC 0.035 8 ; -0.0606
- HG2 HC 0.035 9 ; -0.0254
- CD C 0.695 10 ; 0.6697
- OE1 O -0.609 11 ; 0.0611
- NE2 N -0.941 12 ; -0.8796
- HE21 H 0.425 13 ; -0.4545
- HE22 H 0.425 14 ; -0.0294
- C C 0.597 15 ; 0.5679
- O O -0.568 16 ; 1.11022e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD OE1
- CD NE2
- NE2 HE21
- NE2 HE22
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
- CG NE2 CD OE1 ai_X__X__C__O_
- CD HE21 NE2 HE22 ai_X__X__N__H_
-; end residue GLN: 17 atoms, 17 bonds, 17 pdihs, 4 idihs
-
-; ARGININE
-;
-[ ARG ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.348 0 ; -0.3479
- H H 0.275 1 ; -0.0732
- CA CT -0.264 2 ; -0.3369
- HA H1 0.156 3 ; -0.1809
- CB CT -0.001 4 ; -0.1816
- HB1 HC 0.033 5 ; -0.1489
- HB2 HC 0.033 6 ; -0.1162
- CG CT 0.039 7 ; -0.0772
- HG1 HC 0.029 8 ; -0.0487
- HG2 HC 0.029 9 ; -0.0202
- CD CT 0.049 10 ; 0.0284
- HD1 H1 0.069 11 ; 0.0971
- HD2 H1 0.069 12 ; 0.1658
- NE N2 -0.529 13 ; -0.3637
- HE H 0.346 14 ; -0.0181
- CZ CA 0.808 15 ; 0.7895
- NH1 N2 -0.863 16 ; -0.0732
- HH11 H 0.448 17 ; 0.3746
- HH12 H 0.448 18 ; 0.8224
- NH2 N2 -0.863 19 ; -0.0403
- HH21 H 0.448 20 ; 0.4075
- HH22 H 0.448 21 ; 0.8553
- C C 0.734 22 ; 1.5894
- O O -0.589 23 ; 1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD HD1
- CD HD2
- CD NE
- NE HE
- NE CZ
- CZ NH1
- NH1 HH11
- NH1 HH12
- CZ NH2
- NH2 HH21
- NH2 HH22
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
- NE NH1 CZ NH2 ai_X__N2_CA_N2
- CD CZ NE HE ai_X__X__N2_H_
- CZ HH11 NH1 HH12 ai_X__X__N2_H_
- CZ HH21 NH2 HH22 ai_X__X__N2_H_
-; end residue ARG: 24 atoms, 24 bonds, 24 pdihs, 6 idihs
-
-; HISTIDINE DELTAH
-;
-[ HID ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT 0.019 2 ; -0.125
- HA H1 0.088 3 ; -0.0369
- CB CT -0.046 4 ; -0.0831
- HB1 HC 0.040 5 ; -0.0429
- HB2 HC 0.040 6 ; -0.0027
- CG CC -0.027 7 ; -0.0293
- ND1 NA -0.381 8 ; -0.4104
- HD1 H 0.365 9 ; -0.0455
- CE1 CR 0.206 10 ; 0.1602
- HE1 H5 0.139 11 ; 0.2994
- NE2 NB -0.573 12 ; -0.2733
- CD2 CV 0.129 13 ; -0.1441
- HD2 H4 0.115 14 ; -0.0294
- C C 0.597 15 ; 0.5679
- O O -0.568 16 ; 1.11022e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG ND1
- ND1 HD1
- ND1 CE1
- CE1 HE1
- CE1 NE2
- NE2 CD2
- CD2 HD2
- CA C
- C O
- CG CD2
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
- CG CE1 ND1 HD1 ai_X__X__NA_H_
- CG NE2 CD2 HD2 ai_X__X__CV_H4
- ND1 NE2 CE1 HE1 ai_X__X__CR_H5
- ND1 CD2 CG CB ai_NA_CV_CC_CT
-; end residue HID: 17 atoms, 18 bonds, 17 pdihs, 6 idihs
-
-; HISTIDINE EPSILONH
-;
-[ HIE ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT -0.058 2 ; -0.2019
- HA H1 0.136 3 ; -0.0659
- CB CT -0.007 4 ; -0.0733
- HB1 HC 0.037 5 ; -0.0366
- HB2 HC 0.037 6 ; 0.0001
- CG CC 0.187 7 ; 0.1869
- ND1 NB -0.543 8 ; -0.3563
- CE1 CR 0.164 9 ; -0.1928
- HE1 H5 0.143 10 ; -0.0493
- NE2 NA -0.280 11 ; -0.3288
- HE2 H 0.334 12 ; 0.0051
- CD2 CW -0.221 13 ; -0.2156
- HD2 H4 0.186 14 ; -0.0294
- C C 0.597 15 ; 0.5679
- O O -0.568 16 ; 0
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG ND1
- ND1 CE1
- CE1 HE1
- CE1 NE2
- NE2 HE2
- NE2 CD2
- CD2 HD2
- CA C
- C O
- CG CD2
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
- CE1 CD2 NE2 HE2 ai_X__X__NA_H_
- CG NE2 CD2 HD2 ai_X__X__CW_H4
- ND1 NE2 CE1 HE1 ai_X__X__CR_H5
- ND1 CD2 CG CB ai_NB_CW_CC_CT
-; end residue HIE: 17 atoms, 18 bonds, 17 pdihs, 6 idihs
-
-; HISTIDINE PLUS
-;
-[ HIP ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.348 0 ; -0.3479
- H H 0.275 1 ; -0.0732
- CA CT -0.135 2 ; -0.2086
- HA H1 0.121 3 ; -0.0874
- CB CT -0.041 4 ; -0.1288
- HB1 HC 0.081 5 ; -0.0478
- HB2 HC 0.081 6 ; 0.0332
- CG CC -0.001 7 ; 0.032
- ND1 NA -0.151 8 ; -0.1193
- HD1 H 0.387 9 ; 0.2673
- CE1 CR -0.017 10 ; 0.2503
- HE1 H5 0.268 11 ; 0.5184
- NE2 NA -0.172 12 ; 0.3466
- HE2 H 0.391 13 ; 0.7377
- CD2 CW -0.114 14 ; 0.6236
- HD2 H4 0.232 15 ; 0.8553
- C C 0.734 16 ; 1.5894
- O O -0.589 17 ; 1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG ND1
- ND1 HD1
- ND1 CE1
- CE1 HE1
- CE1 NE2
- NE2 HE2
- NE2 CD2
- CD2 HD2
- CA C
- C O
- CG CD2
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
- CG CE1 ND1 HD1 ai_X__X__NA_H_
- CE1 CD2 NE2 HE2 ai_X__X__NA_H_
- CG NE2 CD2 HD2 ai_X__X__CW_H4
- ND1 NE2 CE1 HE1 ai_X__X__CR_H5
- ND1 CD2 CG CB ai_NA_CW_CC_CT
-; end residue HIP: 18 atoms, 19 bonds, 18 pdihs, 7 idihs
-
-; TRYPTOPHAN
-;
-[ TRP ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT -0.028 2 ; -0.1713
- HA H1 0.112 3 ; -0.059
- CB CT -0.005 4 ; -0.064
- HB1 HC 0.034 5 ; -0.0301
- HB2 HC 0.034 6 ; 0.0038
- CG C* -0.141 7 ; -0.1377
- CD1 CW -0.164 8 ; -0.3015
- HD1 H4 0.206 9 ; -0.0953
- NE1 NA -0.342 10 ; -0.4371
- HE1 H 0.341 11 ; -0.0959
- CE2 CN 0.138 12 ; 0.0421
- CZ2 CA -0.260 13 ; -0.218
- HZ2 HA 0.157 14 ; -0.0608
- CH2 CA -0.113 15 ; -0.1742
- HH2 HA 0.142 16 ; -0.0325
- CZ3 CA -0.197 17 ; -0.2297
- HZ3 HA 0.145 18 ; -0.085
- CE3 CA -0.239 19 ; -0.3237
- HE3 HA 0.170 20 ; -0.1537
- CD2 CB 0.124 21 ; -0.0294
- C C 0.597 22 ; 0.5679
- O O -0.568 23 ; 1.11022e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG CD1
- CD1 HD1
- CD1 NE1
- NE1 HE1
- NE1 CE2
- CE2 CZ2
- CZ2 HZ2
- CZ2 CH2
- CH2 HH2
- CH2 CZ3
- CZ3 HZ3
- CZ3 CE3
- CE3 HE3
- CE3 CD2
- CA C
- C O
- CG CD2
- CE2 CD2
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
- CD1 CE2 NE1 HE1 ai_X__X__NA_H_
- CE2 CH2 CZ2 HZ2 ai_X__X__CA_HA
- CZ2 CZ3 CH2 HH2 ai_X__X__CA_HA
- CH2 CE3 CZ3 HZ3 ai_X__X__CA_HA
- CZ3 CD2 CE3 HE3 ai_X__X__CA_HA
- CG NE1 CD1 HD1 ai_X__X__CW_H4
- CD1 CD2 CG CB ai_CW_CB_C*_CT
-; end residue TRP: 24 atoms, 26 bonds, 24 pdihs, 9 idihs
-
-; PHENYLALANINE
-;
-[ PHE ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT -0.002 2 ; -0.1462
- HA H1 0.098 3 ; -0.0484
- CB CT -0.034 4 ; -0.0827
- HB1 HC 0.029 5 ; -0.0532
- HB2 HC 0.029 6 ; -0.0237
- CG CA 0.012 7 ; -0.0119
- CD1 CA -0.126 8 ; -0.1375
- HD1 HA 0.133 9 ; -0.0045
- CE1 CA -0.170 10 ; -0.1749
- HE1 HA 0.143 11 ; -0.0319
- CZ CA -0.107 12 ; -0.1391
- HZ HA 0.130 13 ; -0.0094
- CE2 CA -0.170 14 ; -0.1798
- HE2 HA 0.143 15 ; -0.0368
- CD2 CA -0.126 16 ; -0.1624
- HD2 HA 0.133 17 ; -0.0294
- C C 0.597 18 ; 0.5679
- O O -0.568 19 ; 1.11022e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG CD1
- CD1 HD1
- CD1 CE1
- CE1 HE1
- CE1 CZ
- CZ HZ
- CZ CE2
- CE2 HE2
- CE2 CD2
- CD2 HD2
- CA C
- C O
- CG CD2
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
- CG CE2 CD2 HD2 ai_X__X__CA_HA
- CD2 CZ CE2 HE2 ai_X__X__CA_HA
- CE1 CE2 CZ HZ ai_X__X__CA_HA
- CD1 CZ CE1 HE1 ai_X__X__CA_HA
- CG CE1 CD1 HD1 ai_X__X__CA_HA
- CD1 CD2 CG CB ai_CA_CA_CA_CT
-; end residue PHE: 20 atoms, 21 bonds, 20 pdihs, 8 idihs
-
-; TYROSINE
-;
-[ TYR ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT -0.001 2 ; -0.1452
- HA H1 0.088 3 ; -0.0576
- CB CT -0.015 4 ; -0.0728
- HB1 HC 0.029 5 ; -0.0433
- HB2 HC 0.029 6 ; -0.0138
- CG CA -0.001 7 ; -0.0149
- CD1 CA -0.191 8 ; -0.2055
- HD1 HA 0.170 9 ; -0.0356
- CE1 CA -0.234 10 ; -0.2697
- HE1 HA 0.166 11 ; -0.1041
- CZ C 0.323 12 ; 0.2185
- OH OH -0.558 13 ; -0.3394
- HH HO 0.399 14 ; 0.0598
- CE2 CA -0.234 15 ; -0.1743
- HE2 HA 0.166 16 ; -0.0087
- CD2 CA -0.191 17 ; -0.1993
- HD2 HA 0.170 18 ; -0.0294
- C C 0.597 19 ; 0.5679
- O O -0.568 20 ; 1.11022e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG CD1
- CD1 HD1
- CD1 CE1
- CE1 HE1
- CE1 CZ
- CZ OH
- OH HH
- CZ CE2
- CE2 HE2
- CE2 CD2
- CD2 HD2
- CA C
- C O
- CG CD2
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
- CG CE2 CD2 HD2 ai_X__X__CA_HA
- CD2 CZ CE2 HE2 ai_X__X__CA_HA
- CD1 CZ CE1 HE1 ai_X__X__CA_HA
- CG CE1 CD1 HD1 ai_X__X__CA_HA
- CD1 CD2 CG CB ai_CA_CA_CA_CT
- CE1 CE2 CZ OH ai_CA_CA_C__OH
-; end residue TYR: 21 atoms, 22 bonds, 21 pdihs, 8 idihs
-
-; GLUTAMIC ACID
-;
-[ GLU ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.516 0 ; -0.5163
- H H 0.294 1 ; -0.2227
- CA CT 0.040 2 ; -0.183
- HA H1 0.111 3 ; -0.0725
- CB CT 0.056 4 ; -0.0165
- HB1 HC -0.017 5 ; -0.0338
- HB2 HC -0.017 6 ; -0.0511
- CG CT 0.014 7 ; -0.0375
- HG1 HC -0.043 8 ; -0.08
- HG2 HC -0.043 9 ; -0.1225
- CD C 0.805 10 ; 0.6829
- OE1 O2 -0.819 11 ; -0.1359
- OE2 O2 -0.819 12 ; -0.9547
- C C 0.537 13 ; -0.4181
- O O -0.582 14 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD OE1
- CD OE2
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
- CG OE1 CD OE2 ai_X__O2_C__O2
-; end residue GLU: 15 atoms, 15 bonds, 15 pdihs, 3 idihs
-
-; ASPARTIC ACID
-;
-[ ASP ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.516 0 ; -0.5163
- H H 0.294 1 ; -0.2227
- CA CT 0.038 2 ; -0.1846
- HA H1 0.088 3 ; -0.0966
- CB CT -0.030 4 ; -0.1269
- HB1 HC -0.012 5 ; -0.1391
- HB2 HC -0.012 6 ; -0.1513
- CG C 0.799 7 ; 0.6481
- OD1 O2 -0.801 8 ; -0.1533
- OD2 O2 -0.801 9 ; -0.9547
- C C 0.537 10 ; -0.4181
- O O -0.582 11 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG OD1
- CG OD2
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
- CB OD1 CG OD2 ai_X__O2_C__O2
-; end residue ASP: 12 atoms, 12 bonds, 12 pdihs, 3 idihs
-
-; LYSINE
-;
-[ LYS ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.348 0 ; -0.3479
- H H 0.275 1 ; -0.0732
- CA CT -0.240 2 ; -0.3132
- HA H1 0.143 3 ; -0.1706
- CB CT -0.009 4 ; -0.18
- HB1 HC 0.036 5 ; -0.1438
- HB2 HC 0.036 6 ; -0.1076
- CG CT 0.019 7 ; -0.0889
- HG1 HC 0.010 8 ; -0.0786
- HG2 HC 0.010 9 ; -0.0683
- CD CT -0.048 10 ; -0.1162
- HD1 HC 0.062 11 ; -0.0541
- HD2 HC 0.062 12 ; 0.008
- CE CT -0.014 13 ; -0.0063
- HE1 HP 0.114 14 ; 0.1072
- HE2 HP 0.114 15 ; 0.2207
- NZ N3 -0.385 16 ; -0.1647
- HZ1 H 0.340 17 ; 0.1753
- HZ2 H 0.340 18 ; 0.5153
- HZ3 H 0.340 19 ; 0.8553
- C C 0.734 20 ; 1.5894
- O O -0.589 21 ; 1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD HD1
- CD HD2
- CD CE
- CE HE1
- CE HE2
- CE NZ
- NZ HZ1
- NZ HZ2
- NZ HZ3
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
-; end residue LYS: 22 atoms, 22 bonds, 22 pdihs, 2 idihs
-
-; LYSINE neutral
-;
-[ LYN ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT -0.072 2 ; -0.21586
- HA H1 0.099 3 ; -0.11646
- CB CT -0.048 4 ; -0.16491
- HB1 HC 0.034 5 ; -0.13091
- HB2 HC 0.034 6 ; -0.09691
- CG CT 0.066 7 ; -0.03079
- HG1 HC 0.010 8 ; -0.02038
- HG2 HC 0.010 9 ; -0.00997
- CD CT -0.038 10 ; -0.04765
- HD1 HC 0.012 11 ; -0.0361
- HD2 HC 0.012 12 ; -0.02455
- CE CT 0.326 13 ; 0.30149
- HE1 HP -0.034 14 ; 0.26791
- HE2 HP -0.034 15 ; 0.23433
- NZ N3 -1.036 16 ; -0.80148
- HZ1 H 0.386 17 ; -0.41544
- HZ2 H 0.386 18 ; -0.0294
- C C 0.597 19 ; 0.5679
- O O -0.568 20 ; 1.11022e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD HD1
- CD HD2
- CD CE
- CE HE1
- CE HE2
- CE NZ
- NZ HZ1
- NZ HZ2
- CA C
- O O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
-; end residue LYN: 21 atoms, 21 bonds, 21 pdihs, 2 idihs
-
-; PROLINE
-;
-[ PRO ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.255 0 ; -0.2548
- CD CT 0.019 1 ; -0.2356
- HD1 H1 0.039 2 ; -0.1965
- HD2 H1 0.039 3 ; -0.1574
- CG CT 0.019 4 ; -0.1385
- HG1 HC 0.021 5 ; -0.1172
- HG2 HC 0.021 6 ; -0.0959
- CB CT -0.007 7 ; -0.1029
- HB1 HC 0.025 8 ; -0.0776
- HB2 HC 0.025 9 ; -0.0523
- CA CT -0.027 10 ; -0.0789
- HA H1 0.064 11 ; -0.0148
- C C 0.590 12 ; 0.5748
- O O -0.575 13 ; 0
- [ bonds ]
-; ai aj
- -C N
- N CD
- CD HD1
- CD HD2
- CD CG
- CG HG1
- CG HG2
- CG CB
- CB HB1
- CB HB2
- N CA
- CA HA
- CA C
- C O
- CB CA
- [ dihedrals ]
-; ai aj ak al
- CG CD N -C ad_CT_CT_N__C__1
- CG CD N -C ad_CT_CT_N__C__2
- CG CD N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
- -C CD N CA ai_X__CT_N__CT
-; end residue PRO: 14 atoms, 15 bonds, 14 pdihs, 2 idihs
-
-; CYSTEINE
-;
-[ CYS ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT 0.021 2 ; -0.1225
- HA H1 0.112 3 ; -0.0101
- CB CT -0.123 4 ; -0.1332
- HB1 H1 0.111 5 ; -0.022
- HB2 H1 0.111 6 ; 0.0892
- SG SH -0.312 7 ; -0.2227
- HG HS 0.193 8 ; -0.0294
- C C 0.597 9 ; 0.5679
- O O -0.568 10 ; 0
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB SG
- SG HG
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
-; end residue CYS: 11 atoms, 11 bonds, 11 pdihs, 2 idihs
-
-; CYSTEINE with negative charge
-;
-[ CYM ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H1 H 0.272 1 ; -0.1438
- CA CT -0.035 2 ; -0.1789
- HA H1 0.051 3 ; -0.1281
- CB CT -0.241 4 ; -0.3694
- HB1 H1 0.112 5 ; -0.2572
- HB2 H1 0.112 6 ; -0.145
- SG SH -0.884 7 ; -1.0294
- C C 0.597 8 ; -0.4321
- O O -0.568 9 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H1
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB SG
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H1 ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
-; end residue CYM: 10 atoms, 10 bonds, 10 pdihs, 2 idihs
-
-; CYSTINE(S-S BRIDGE)
-;
-[ CYX ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT 0.043 2 ; -0.1009
- HA H1 0.077 3 ; -0.0243
- CB CT -0.079 4 ; -0.1033
- HB1 H1 0.091 5 ; -0.0123
- HB2 H1 0.091 6 ; 0.0787
- SG S -0.108 7 ; -0.0294
- C C 0.597 8 ; 0.5679
- O O -0.568 9 ; 0
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB SG
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
-; end residue CYX: 10 atoms, 10 bonds, 10 pdihs, 2 idihs
-
-; METHIONINE
-;
-[ MET ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT -0.024 2 ; -0.1675
- HA H1 0.088 3 ; -0.0795
- CB CT 0.034 4 ; -0.0453
- HB1 HC 0.024 5 ; -0.0212
- HB2 HC 0.024 6 ; 0.0029
- CG CT 0.002 7 ; 0.0047
- HG1 H1 0.044 8 ; 0.0487
- HG2 H1 0.044 9 ; 0.0927
- SD S -0.274 10 ; -0.181
- CE CT -0.054 11 ; -0.2346
- HE1 H1 0.068 12 ; -0.1662
- HE2 H1 0.068 13 ; -0.0978
- HE3 H1 0.068 14 ; -0.0294
- C C 0.597 15 ; 0.5679
- O O -0.568 16 ; 0
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG SD
- SD CE
- CE HE1
- CE HE2
- CE HE3
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
-; end residue MET: 17 atoms, 17 bonds, 17 pdihs, 2 idihs
-
-; ACE BEGINNING GROUP
-;
-[ ACE ]
- [ atoms ]
-;name type charge cg ; qtot
- CH3 CT -0.366 0 ; -0.3662
- H1 HC 0.112 1 ; -0.2539
- HH31 HC 0.112 2 ; -0.1416
- HH32 HC 0.112 3 ; -0.0293
- C C 0.597 4 ; 0.5679
- O O -0.568 5 ; 0
- [ bonds ]
-; ai aj
- H1 CH3
- CH3 HH31
- CH3 HH32
- CH3 C
- C O
- [ impropers ]
-; ai aj ak al
- CH3 +CA C O ai_X__X__C__O_
-; end residue ACE: 6 atoms, 5 bonds, 6 pdihs, 1 idihs
-
-; N-methyl all atom
-;
-[ NME ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CH3 CT -0.149 2 ; -0.2928
- HH31 H1 0.098 3 ; -0.1952
- HH32 H1 0.098 4 ; -0.0976
- HH33 H1 0.098 5 ; -2.77556e-17
- [ bonds ]
-; ai aj
- -C N
- N H
- N CH3
- CH3 HH31
- CH3 HH32
- CH3 HH33
- [ impropers ]
-; ai aj ak al
- -C CH3 N H ai_X__X__N__H_
-; end residue NME: 6 atoms, 6 bonds, 6 pdihs, 1 idihs
-
-; NH2 ENDING GROUP
-;
-[ NHE ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.463 0 ; -0.463
- H1 H 0.232 1 ; -0.2315
- H2 H 0.232 2 ; 0
- [ bonds ]
-; ai aj
- -C N
- N H1
- N H2
- [ impropers ]
-; ai aj ak al
- -C H1 N H2 ai_X__X__N__H_
-; end residue NHE: 3 atoms, 3 bonds, 3 pdihs, 1 idihs
-
-; WATER, TIP3P MODEL
-;
-[ HOH ]
- [ atoms ]
-;name type charge cg ; qtot
- O OW -0.834 0 ; -0.834
- H3 HW 0.417 1 ; -0.417
- H1 HW 0.417 2 ; 0
- [ bonds ]
-; ai aj
- H3 O
- O H1
- H3 H1
-; end residue HOH: 3 atoms, 3 bonds, 3 pdihs, 0 idihs
-
-; ASP neutral
-;
-[ ASH ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT 0.034 2 ; -0.1097
- HA H1 0.086 3 ; -0.0233
- CB CT -0.032 4 ; -0.0549
- HB1 HC 0.049 5 ; -0.0061
- HB2 HC 0.049 6 ; 0.0427
- CG C 0.646 7 ; 0.6889
- OD1 O -0.555 8 ; 0.1335
- OD2 OH -0.638 9 ; -0.5041
- HD2 HO 0.475 10 ; -0.0294
- C C 0.597 11 ; 0.5679
- O O -0.568 12 ; 1.11022e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG OD1
- CG OD2
- OD2 HD2
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
- CB OD1 CG OD2 ai_CT_O__C__OH
-; end residue ASH: 13 atoms, 13 bonds, 13 pdihs, 3 idihs
-
-; GLU neutral
-;
-[ GLH ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.416 0 ; -0.4157
- H H 0.272 1 ; -0.1438
- CA CT 0.015 2 ; -0.1293
- HA H1 0.078 3 ; -0.0514
- CB CT -0.007 4 ; -0.0585
- HB1 HC 0.026 5 ; -0.0329
- HB2 HC 0.026 6 ; -0.0073
- CG CT -0.017 7 ; -0.0247
- HG1 HC 0.043 8 ; 0.0183
- HG2 HC 0.043 9 ; 0.0613
- CD C 0.680 10 ; 0.7414
- OE1 O -0.584 11 ; 0.1576
- OE2 OH -0.651 12 ; -0.4935
- HE2 HO 0.464 13 ; -0.0294
- C C 0.597 14 ; 0.5679
- O O -0.568 15 ; 1.11022e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD OE1
- CD OE2
- OE2 HE2
- CA C
- C O
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA +N C O ai_X__X__C__O_
- CG OE1 CD OE2 ai_CT_O__C__OH
-; end residue GLH: 16 atoms, 16 bonds, 16 pdihs, 3 idihs
-
-; Sodium Ion
-;
-[ CIP ]
- [ atoms ]
-;name type charge cg ; qtot
- NA+ IP 1.000 0 ; 1
-; end residue CIP: 1 atoms, 1 bonds, 1 pdihs, 0 idihs
-
-; Chloride Ion
-;
-[ CIM ]
- [ atoms ]
-;name type charge cg ; qtot
- CL- IM -1.000 0 ; -1
-; end residue CIM: 1 atoms, 1 bonds, 1 pdihs, 0 idihs
-
-; end of file /usr/slocal/amber6/dat/all_amino94.in
-; from file /usr/slocal/amber6/dat/all_aminoct94.in
-;
-; reading database: All-atom, COO- terminal
-;
-; ALANINE COO- ANION
-;
-[ ALA-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.175 2 ; -0.2887
- HA H1 0.107 3 ; -0.182
- CB CT -0.209 4 ; -0.3913
- HB1 HC 0.076 5 ; -0.3149
- HB2 HC 0.076 6 ; -0.2385
- HB3 HC 0.076 7 ; -0.1621
- C C 0.773 8 ; 0.611
- O O2 -0.805 9 ; -0.1945
- OXT O2 -0.805 10 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB HB3
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
-; end residue ALA-C: 11 atoms, 11 bonds, 11 pdihs, 2 idihs
-
-; GLYCINE COO- ANION
-;
-[ GLY-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.249 2 ; -0.3633
- HA1 H1 0.106 3 ; -0.2577
- HA2 H1 0.106 4 ; -0.1521
- C C 0.723 5 ; 0.571
- O O2 -0.785 6 ; -0.2145
- OXT O2 -0.785 7 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA1
- CA HA2
- CA C
- C O
- C OXT
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
-; end residue GLY-C: 8 atoms, 8 bonds, 8 pdihs, 2 idihs
-
-; SERINE COO- ANION
-;
-[ SER-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.272 2 ; -0.3862
- HA H1 0.130 3 ; -0.2558
- CB CT 0.112 4 ; -0.1435
- HB1 H1 0.081 5 ; -0.0622
- HB2 H1 0.081 6 ; 0.0191
- OG OH -0.651 7 ; -0.6323
- HG HO 0.447 8 ; -0.1849
- C C 0.811 9 ; 0.6264
- O O2 -0.813 10 ; -0.1868
- OXT O2 -0.813 11 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB OG
- OG HG
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
-; end residue SER-C: 12 atoms, 12 bonds, 12 pdihs, 2 idihs
-
-; THREONINE COO- ANION
-;
-[ THR-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.242 2 ; -0.356
- HA H1 0.121 3 ; -0.2353
- CB CT 0.302 4 ; 0.0672
- HB H1 0.008 5 ; 0.075
- CG2 CT -0.185 6 ; -0.1103
- HG21 HC 0.059 7 ; -0.0517
- HG22 HC 0.059 8 ; 0.0069
- HG23 HC 0.059 9 ; 0.0655
- OG1 OH -0.650 10 ; -0.5841
- HG1 HO 0.412 11 ; -0.1722
- C C 0.781 12 ; 0.6088
- O O2 -0.804 13 ; -0.1956
- OXT O2 -0.804 14 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB
- CB CG2
- CG2 HG21
- CG2 HG22
- CG2 HG23
- CB OG1
- OG1 HG1
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
-; end residue THR-C: 15 atoms, 15 bonds, 15 pdihs, 2 idihs
-
-; LEUCINE COO- ANION
-;
-[ LEU-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.285 2 ; -0.3987
- HA H1 0.135 3 ; -0.2641
- CB CT -0.247 4 ; -0.511
- HB1 HC 0.097 5 ; -0.4136
- HB2 HC 0.097 6 ; -0.3162
- CG CT 0.371 7 ; 0.0544
- HG HC -0.037 8 ; 0.017
- CD1 CT -0.416 9 ; -0.3993
- HD11 HC 0.104 10 ; -0.2955
- HD12 HC 0.104 11 ; -0.1917
- HD13 HC 0.104 12 ; -0.0879
- CD2 CT -0.416 13 ; -0.5042
- HD21 HC 0.104 14 ; -0.4004
- HD22 HC 0.104 15 ; -0.2966
- HD23 HC 0.104 16 ; -0.1928
- C C 0.833 17 ; 0.6398
- O O2 -0.820 18 ; -0.1801
- OXT O2 -0.820 19 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG
- CG CD1
- CD1 HD11
- CD1 HD12
- CD1 HD13
- CG CD2
- CD2 HD21
- CD2 HD22
- CD2 HD23
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
-; end residue LEU-C: 20 atoms, 20 bonds, 20 pdihs, 2 idihs
-
-; ISOLEUCINE COO- ANION
-;
-[ ILE-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.310 2 ; -0.424
- HA H1 0.138 3 ; -0.2865
- CB CT 0.036 4 ; -0.2502
- HB HC 0.077 5 ; -0.1736
- CG2 CT -0.350 6 ; -0.5234
- HG21 HC 0.102 7 ; -0.4213
- HG22 HC 0.102 8 ; -0.3192
- HG23 HC 0.102 9 ; -0.2171
- CG1 CT -0.032 10 ; -0.2494
- HG11 HC 0.032 11 ; -0.2173
- HG12 HC 0.032 12 ; -0.1852
- CD1 CT -0.070 13 ; -0.2551
- HD11 HC 0.020 14 ; -0.2355
- HD12 HC 0.020 15 ; -0.2159
- HD13 HC 0.020 16 ; -0.1963
- C C 0.834 17 ; 0.638
- O O2 -0.819 18 ; -0.181
- OXT O2 -0.819 19 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB
- CB CG2
- CG2 HG21
- CG2 HG22
- CG2 HG23
- CB CG1
- CG1 HG11
- CG1 HG12
- CG1 CD1
- CD1 HD11
- CD1 HD12
- CD1 HD13
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
-; end residue ILE-C: 20 atoms, 20 bonds, 20 pdihs, 2 idihs
-
-; VALINE COO- ANION
-;
-[ VAL-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.344 2 ; -0.4578
- HA H1 0.144 3 ; -0.314
- CB CT 0.194 4 ; -0.12
- HB HC 0.031 5 ; -0.0892
- CG1 CT -0.306 6 ; -0.3956
- HG11 HC 0.084 7 ; -0.312
- HG12 HC 0.084 8 ; -0.2284
- HG13 HC 0.084 9 ; -0.1448
- CG2 CT -0.306 10 ; -0.4512
- HG21 HC 0.084 11 ; -0.3676
- HG22 HC 0.084 12 ; -0.284
- HG23 HC 0.084 13 ; -0.2004
- C C 0.835 14 ; 0.6346
- O O2 -0.817 15 ; -0.1827
- OXT O2 -0.817 16 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB
- CB CG1
- CG1 HG11
- CG1 HG12
- CG1 HG13
- CB CG2
- CG2 HG21
- CG2 HG22
- CG2 HG23
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
-; end residue VAL-C: 17 atoms, 17 bonds, 17 pdihs, 2 idihs
-
-; ASPARAGINE COO- ANION
-;
-[ ASN-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.208 2 ; -0.322
- HA H1 0.136 3 ; -0.1862
- CB CT -0.230 4 ; -0.4161
- HB1 HC 0.102 5 ; -0.3138
- HB2 HC 0.102 6 ; -0.2115
- CG C 0.715 7 ; 0.5038
- OD1 O -0.601 8 ; -0.0972
- ND2 N -0.908 9 ; -1.0056
- HD21 H 0.415 10 ; -0.5906
- HD22 H 0.415 11 ; -0.1756
- C C 0.805 12 ; 0.6294
- O O2 -0.815 13 ; -0.1853
- OXT O2 -0.815 14 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG OD1
- CG ND2
- ND2 HD21
- ND2 HD22
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
- CB ND2 CG OD1 ai_X__X__C__O_
- CG HD21 ND2 HD22 ai_X__X__N__H_
-; end residue ASN-C: 15 atoms, 15 bonds, 15 pdihs, 4 idihs
-
-; GLUTAMINE COO- ANION
-;
-[ GLN-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.225 2 ; -0.3388
- HA H1 0.123 3 ; -0.2156
- CB CT -0.066 4 ; -0.282
- HB1 HC 0.045 5 ; -0.2368
- HB2 HC 0.045 6 ; -0.1916
- CG CT -0.021 7 ; -0.2126
- HG1 HC 0.020 8 ; -0.1923
- HG2 HC 0.020 9 ; -0.172
- CD C 0.709 10 ; 0.5373
- OE1 O -0.610 11 ; -0.0725
- NE2 N -0.957 12 ; -1.0299
- HE21 H 0.430 13 ; -0.5995
- HE22 H 0.430 14 ; -0.1691
- C C 0.777 15 ; 0.6084
- O O2 -0.804 16 ; -0.1958
- OXT O2 -0.804 17 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD OE1
- CD NE2
- NE2 HE21
- NE2 HE22
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
- CG NE2 CD OE1 ai_X__X__C__O_
- CD HE21 NE2 HE22 ai_X__X__N__H_
-; end residue GLN-C: 18 atoms, 18 bonds, 18 pdihs, 4 idihs
-
-; ARGININE COO- ANION
-;
-[ ARG-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.348 0 ; -0.3481
- H H 0.276 1 ; -0.0717
- CA CT -0.307 2 ; -0.3785
- HA H1 0.145 3 ; -0.2338
- CB CT -0.037 4 ; -0.2712
- HB1 HC 0.037 5 ; -0.2341
- HB2 HC 0.037 6 ; -0.197
- CG CT 0.074 7 ; -0.1226
- HG1 HC 0.018 8 ; -0.1041
- HG2 HC 0.018 9 ; -0.0856
- CD CT 0.111 10 ; 0.0258
- HD1 H1 0.047 11 ; 0.0726
- HD2 H1 0.047 12 ; 0.1194
- NE N2 -0.556 13 ; -0.437
- HE H 0.348 14 ; -0.0891
- CZ CA 0.837 15 ; 0.7477
- NH1 N2 -0.874 16 ; -0.126
- HH11 H 0.449 17 ; 0.3233
- HH12 H 0.449 18 ; 0.7726
- NH2 N2 -0.874 19 ; -0.1011
- HH21 H 0.449 20 ; 0.3482
- HH22 H 0.449 21 ; 0.7975
- C C 0.856 22 ; 1.6532
- O O2 -0.827 23 ; 0.8266
- OXT O2 -0.827 24 ; -2.22045e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD HD1
- CD HD2
- CD NE
- NE HE
- NE CZ
- CZ NH1
- NH1 HH11
- NH1 HH12
- CZ NH2
- NH2 HH21
- NH2 HH22
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
- NE NH1 CZ NH2 ai_X__N2_CA_N2
- CD CZ NE HE ai_X__X__N2_H_
- CZ HH11 NH1 HH12 ai_X__X__N2_H_
- CZ HH21 NH2 HH22 ai_X__X__N2_H_
-; end residue ARG-C: 25 atoms, 25 bonds, 25 pdihs, 6 idihs
-
-; HISTIDINE DELTAH COO- ANION
-;
-[ HID-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.174 2 ; -0.2879
- HA H1 0.110 3 ; -0.1779
- CB CT -0.105 4 ; -0.2825
- HB1 HC 0.057 5 ; -0.226
- HB2 HC 0.057 6 ; -0.1695
- CG CC 0.029 7 ; -0.1402
- ND1 NA -0.389 8 ; -0.5294
- HD1 H 0.376 9 ; -0.1539
- CE1 CR 0.193 10 ; 0.0386
- HE1 H5 0.142 11 ; 0.1804
- NE2 NB -0.563 12 ; -0.3825
- CD2 CV 0.100 13 ; -0.2824
- HD2 H4 0.124 14 ; -0.1583
- C C 0.761 15 ; 0.6032
- O O2 -0.802 16 ; -0.1984
- OXT O2 -0.802 17 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG ND1
- ND1 HD1
- ND1 CE1
- CE1 HE1
- CE1 NE2
- NE2 CD2
- CD2 HD2
- CA C
- C O
- C OXT
- CG CD2
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
- CG CE1 ND1 HD1 ai_X__X__NA_H_
- CG NE2 CD2 HD2 ai_X__X__CV_H4
- ND1 NE2 CE1 HE1 ai_X__X__CR_H5
- ND1 CD2 CG CB ai_NA_CV_CC_CT
-; end residue HID-C: 18 atoms, 19 bonds, 18 pdihs, 6 idihs
-
-; HISTIDINE EPSILON-H COO- ANION
-;
-[ HIE-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.270 2 ; -0.3839
- HA H1 0.165 3 ; -0.2189
- CB CT -0.107 4 ; -0.3257
- HB1 HC 0.062 5 ; -0.2637
- HB2 HC 0.062 6 ; -0.2017
- CG CC 0.272 7 ; 0.0707
- ND1 NB -0.552 8 ; -0.481
- CE1 CR 0.156 9 ; -0.3252
- HE1 H5 0.145 10 ; -0.1804
- NE2 NA -0.267 11 ; -0.4474
- HE2 H 0.332 12 ; -0.1155
- CD2 CW -0.259 13 ; -0.3743
- HD2 H4 0.196 14 ; -0.1786
- C C 0.792 15 ; 0.613
- O O2 -0.806 16 ; -0.1935
- OXT O2 -0.806 17 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG ND1
- ND1 CE1
- CE1 HE1
- CE1 NE2
- NE2 HE2
- NE2 CD2
- CD2 HD2
- CA C
- C O
- C OXT
- CG CD2
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
- CE1 CD2 NE2 HE2 ai_X__X__NA_H_
- CG NE2 CD2 HD2 ai_X__X__CW_H4
- ND1 NE2 CE1 HE1 ai_X__X__CR_H5
- ND1 CD2 CG CB ai_NB_CW_CC_CT
-; end residue HIE-C: 18 atoms, 19 bonds, 18 pdihs, 6 idihs
-
-; HISTIDINE PLUS COO-
-;
-[ HIP-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.348 0 ; -0.3481
- H H 0.276 1 ; -0.0717
- CA CT -0.144 2 ; -0.2162
- HA H1 0.112 3 ; -0.1047
- CB CT -0.080 4 ; -0.1847
- HB1 HC 0.087 5 ; -0.0979
- HB2 HC 0.087 6 ; -0.0111
- CG CC 0.030 7 ; 0.0187
- ND1 NA -0.150 8 ; -0.1314
- HD1 H 0.388 9 ; 0.2569
- CE1 CR -0.025 10 ; 0.2318
- HE1 H5 0.269 11 ; 0.5012
- NE2 NA -0.168 12 ; 0.3329
- HE2 H 0.391 13 ; 0.7242
- CD2 CW -0.126 14 ; 0.5986
- HD2 H4 0.234 15 ; 0.8322
- C C 0.803 16 ; 1.6354
- O O2 -0.818 17 ; 0.8177
- OXT O2 -0.818 18 ; -2.22045e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG ND1
- ND1 HD1
- ND1 CE1
- CE1 HE1
- CE1 NE2
- NE2 HE2
- NE2 CD2
- CD2 HD2
- CA C
- C O
- C OXT
- CG CD2
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
- CG CE1 ND1 HD1 ai_X__X__NA_H_
- CE1 CD2 NE2 HE2 ai_X__X__NA_H_
- CG NE2 CD2 HD2 ai_X__X__CW_H4
- ND1 NE2 CE1 HE1 ai_X__X__CR_H5
- ND1 CD2 CG CB ai_NA_CW_CC_CT
-; end residue HIP-C: 19 atoms, 20 bonds, 19 pdihs, 7 idihs
-
-; TRYPTOPHAN COO- ANION
-;
-[ TRP-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.208 2 ; -0.3224
- HA H1 0.127 3 ; -0.1952
- CB CT -0.074 4 ; -0.2694
- HB1 HC 0.050 5 ; -0.2197
- HB2 HC 0.050 6 ; -0.17
- CG C* -0.080 7 ; -0.2496
- CD1 CW -0.181 8 ; -0.4304
- HD1 H4 0.204 9 ; -0.2261
- NE1 NA -0.332 10 ; -0.5577
- HE1 H 0.341 11 ; -0.2164
- CE2 CN 0.122 12 ; -0.0942
- CZ2 CA -0.259 13 ; -0.3536
- HZ2 HA 0.157 14 ; -0.1969
- CH2 CA -0.102 15 ; -0.2989
- HH2 HA 0.140 16 ; -0.1588
- CZ3 CA -0.229 17 ; -0.3875
- HZ3 HA 0.151 18 ; -0.2368
- CE3 CA -0.184 19 ; -0.4205
- HE3 HA 0.149 20 ; -0.2714
- CD2 CB 0.108 21 ; -0.1636
- C C 0.766 22 ; 0.6022
- O O2 -0.801 23 ; -0.1989
- OXT O2 -0.801 24 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG CD1
- CD1 HD1
- CD1 NE1
- NE1 HE1
- NE1 CE2
- CE2 CZ2
- CZ2 HZ2
- CZ2 CH2
- CH2 HH2
- CH2 CZ3
- CZ3 HZ3
- CZ3 CE3
- CE3 HE3
- CE3 CD2
- CA C
- C O
- C OXT
- CG CD2
- CE2 CD2
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
- CD1 CE2 NE1 HE1 ai_X__X__NA_H_
- CE2 CH2 CZ2 HZ2 ai_X__X__CA_HA
- CZ2 CZ3 CH2 HH2 ai_X__X__CA_HA
- CH2 CE3 CZ3 HZ3 ai_X__X__CA_HA
- CZ3 CD2 CE3 HE3 ai_X__X__CA_HA
- CG NE1 CD1 HD1 ai_X__X__CW_H4
- CD1 CD2 CG CB ai_CW_CB_C*_CT
-; end residue TRP-C: 25 atoms, 27 bonds, 25 pdihs, 9 idihs
-
-; PHENYLALANINE COO- ANION
-;
-[ PHE-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.182 2 ; -0.2965
- HA H1 0.110 3 ; -0.1867
- CB CT -0.096 4 ; -0.2826
- HB1 HC 0.044 5 ; -0.2383
- HB2 HC 0.044 6 ; -0.194
- CG CA 0.055 7 ; -0.1388
- CD1 CA -0.130 8 ; -0.2688
- HD1 HA 0.141 9 ; -0.128
- CE1 CA -0.185 10 ; -0.3127
- HE1 HA 0.146 11 ; -0.1666
- CZ CA -0.094 12 ; -0.261
- HZ HA 0.128 13 ; -0.133
- CE2 CA -0.185 14 ; -0.3177
- HE2 HA 0.146 15 ; -0.1716
- CD2 CA -0.130 16 ; -0.3016
- HD2 HA 0.141 17 ; -0.1608
- C C 0.766 18 ; 0.6052
- O O2 -0.803 19 ; -0.1974
- OXT O2 -0.803 20 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG CD1
- CD1 HD1
- CD1 CE1
- CE1 HE1
- CE1 CZ
- CZ HZ
- CZ CE2
- CE2 HE2
- CE2 CD2
- CD2 HD2
- CA C
- C O
- C OXT
- CG CD2
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
- CG CE2 CD2 HD2 ai_X__X__CA_HA
- CD2 CZ CE2 HE2 ai_X__X__CA_HA
- CE1 CE2 CZ HZ ai_X__X__CA_HA
- CD1 CZ CE1 HE1 ai_X__X__CA_HA
- CG CE1 CD1 HD1 ai_X__X__CA_HA
- CD1 CD2 CG CB ai_CA_CA_CA_CT
-; end residue PHE-C: 21 atoms, 22 bonds, 21 pdihs, 8 idihs
-
-; TYROSINE COO- ANION
-;
-[ TYR-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.202 2 ; -0.3155
- HA H1 0.109 3 ; -0.2063
- CB CT -0.075 4 ; -0.2815
- HB1 HC 0.049 5 ; -0.2325
- HB2 HC 0.049 6 ; -0.1835
- CG CA 0.024 7 ; -0.1592
- CD1 CA -0.192 8 ; -0.3514
- HD1 HA 0.178 9 ; -0.1734
- CE1 CA -0.246 10 ; -0.4192
- HE1 HA 0.167 11 ; -0.2519
- CZ C 0.340 12 ; 0.0876
- OH OH -0.564 13 ; -0.4767
- HH HO 0.402 14 ; -0.075
- CE2 CA -0.246 15 ; -0.3208
- HE2 HA 0.167 16 ; -0.1535
- CD2 CA -0.192 17 ; -0.3457
- HD2 HA 0.178 18 ; -0.1677
- C C 0.782 19 ; 0.614
- O O2 -0.807 20 ; -0.193
- OXT O2 -0.807 21 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG CD1
- CD1 HD1
- CD1 CE1
- CE1 HE1
- CE1 CZ
- CZ OH
- OH HH
- CZ CE2
- CE2 HE2
- CE2 CD2
- CD2 HD2
- CA C
- C O
- C OXT
- CG CD2
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
- CG CE2 CD2 HD2 ai_X__X__CA_HA
- CD2 CZ CE2 HE2 ai_X__X__CA_HA
- CD1 CZ CE1 HE1 ai_X__X__CA_HA
- CG CE1 CD1 HD1 ai_X__X__CA_HA
- CD1 CD2 CG CB ai_CA_CA_CA_CT
- CE1 CE2 CZ OH ai_CA_CA_C__OH
-; end residue TYR-C: 22 atoms, 23 bonds, 22 pdihs, 8 idihs
-
-; GLUTAMIC ACID COO- ANION
-;
-[ GLU-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.519 0 ; -0.5192
- H H 0.305 1 ; -0.2137
- CA CT -0.206 2 ; -0.4196
- HA H1 0.140 3 ; -0.2797
- CB CT 0.007 4 ; -0.2726
- HB1 HC -0.008 5 ; -0.2804
- HB2 HC -0.008 6 ; -0.2882
- CG CT 0.068 7 ; -0.2207
- HG1 HC -0.055 8 ; -0.2755
- HG2 HC -0.055 9 ; -0.3303
- CD C 0.818 10 ; 0.488
- OE1 O2 -0.822 11 ; -0.334
- OE2 O2 -0.822 12 ; -1.156
- C C 0.742 13 ; -0.414
- O O2 -0.793 14 ; -1.207
- OXT O2 -0.793 15 ; -2
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD OE1
- CD OE2
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
- CG OE1 CD OE2 ai_X__O2_C__O2
-; end residue GLU-C: 16 atoms, 16 bonds, 16 pdihs, 3 idihs
-
-; ASPARTIC ACID COO- ANION
-;
-[ ASP-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.519 0 ; -0.5192
- H H 0.305 1 ; -0.2137
- CA CT -0.182 2 ; -0.3954
- HA H1 0.105 3 ; -0.2908
- CB CT -0.068 4 ; -0.3585
- HB1 HC -0.021 5 ; -0.3797
- HB2 HC -0.021 6 ; -0.4009
- CG C 0.885 7 ; 0.4842
- OD1 O2 -0.816 8 ; -0.332
- OD2 O2 -0.816 9 ; -1.1482
- C C 0.726 10 ; -0.4226
- O O2 -0.789 11 ; -1.2113
- OXT O2 -0.789 12 ; -2
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG OD1
- CG OD2
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
- CB OD1 CG OD2 ai_X__O2_C__O2
-; end residue ASP-C: 13 atoms, 13 bonds, 13 pdihs, 3 idihs
-
-; LYSINE COO- ANION
-;
-[ LYS-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.348 0 ; -0.3481
- H H 0.276 1 ; -0.0717
- CA CT -0.290 2 ; -0.362
- HA H1 0.144 3 ; -0.2182
- CB CT -0.054 4 ; -0.272
- HB1 HC 0.048 5 ; -0.2238
- HB2 HC 0.048 6 ; -0.1756
- CG CT 0.023 7 ; -0.1529
- HG1 HC 0.013 8 ; -0.1395
- HG2 HC 0.013 9 ; -0.1261
- CD CT -0.039 10 ; -0.1653
- HD1 HC 0.061 11 ; -0.1042
- HD2 HC 0.061 12 ; -0.0431
- CE CT -0.018 13 ; -0.0607
- HE1 HP 0.112 14 ; 0.0514
- HE2 HP 0.112 15 ; 0.1635
- NZ N3 -0.374 16 ; -0.2106
- HZ1 H 0.337 17 ; 0.1268
- HZ2 H 0.337 18 ; 0.4642
- HZ3 H 0.337 19 ; 0.8016
- C C 0.849 20 ; 1.6504
- O O2 -0.825 21 ; 0.8252
- OXT O2 -0.825 22 ; -2.22045e-16
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD HD1
- CD HD2
- CD CE
- CE HE1
- CE HE2
- CE NZ
- NZ HZ1
- NZ HZ2
- NZ HZ3
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
-; end residue LYS-C: 23 atoms, 23 bonds, 23 pdihs, 2 idihs
-
-; PROLINE COO- ANION
-;
-[ PRO-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.280 0 ; -0.2802
- CD CT 0.043 1 ; -0.2368
- HD1 H1 0.033 2 ; -0.2037
- HD2 H1 0.033 3 ; -0.1706
- CG CT 0.047 4 ; -0.124
- HG1 HC 0.017 5 ; -0.1068
- HG2 HC 0.017 6 ; -0.0896
- CB CT -0.054 7 ; -0.1439
- HB1 HC 0.038 8 ; -0.1058
- HB2 HC 0.038 9 ; -0.0677
- CA CT -0.134 10 ; -0.2013
- HA H1 0.078 11 ; -0.1237
- C C 0.663 12 ; 0.5394
- O O2 -0.770 13 ; -0.2303
- OXT O2 -0.770 14 ; -1
- [ bonds ]
-; ai aj
- -C N
- N CD
- CD HD1
- CD HD2
- CD CG
- CG HG1
- CG HG2
- CG CB
- CB HB1
- CB HB2
- N CA
- CA HA
- CA C
- C O
- C OXT
- CA CB
- [ dihedrals ]
-; ai aj ak al
- CG CD N -C ad_CT_CT_N__C__1
- CG CD N -C ad_CT_CT_N__C__2
- CG CD N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- CA OXT C O ai_X__O2_C__O2
- -C CD N CA ai_X__CT_N__CT
-; end residue PRO-C: 15 atoms, 16 bonds, 15 pdihs, 2 idihs
-
-; CYSTEINE COO- ANION
-;
-[ CYS-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.164 2 ; -0.2775
- HA H1 0.140 3 ; -0.1379
- CB CT -0.200 4 ; -0.3375
- HB1 H1 0.144 5 ; -0.1938
- HB2 H1 0.144 6 ; -0.0501
- SG SH -0.310 7 ; -0.3603
- HS1 HS 0.207 8 ; -0.1535
- C C 0.750 9 ; 0.5962
- O O2 -0.798 10 ; -0.2019
- OXT O2 -0.798 11 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB SG
- SG HS1
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
-; end residue CYS-C: 12 atoms, 12 bonds, 12 pdihs, 2 idihs
-
-; CYSTINE(S-S BRIDGE) COO- ANION
-;
-[ CYX-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.132 2 ; -0.2458
- HA H1 0.094 3 ; -0.152
- CB CT -0.194 4 ; -0.3463
- HB1 H1 0.123 5 ; -0.2235
- HB2 H1 0.123 6 ; -0.1007
- SG S -0.053 7 ; -0.1536
- C C 0.762 8 ; 0.6082
- O O2 -0.804 9 ; -0.1959
- OXT O2 -0.804 10 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB SG
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
-; end residue CYX-C: 11 atoms, 11 bonds, 11 pdihs, 2 idihs
-
-; METHIONINE COO- ANION
-;
-[ MET-C ]
- [ atoms ]
-;name type charge cg ; qtot
- N N -0.382 0 ; -0.3821
- H H 0.268 1 ; -0.114
- CA CT -0.260 2 ; -0.3737
- HA H1 0.128 3 ; -0.246
- CB CT -0.024 4 ; -0.2696
- HB1 HC 0.048 5 ; -0.2216
- HB2 HC 0.048 6 ; -0.1736
- CG CT 0.049 7 ; -0.1244
- HG1 H1 0.032 8 ; -0.0927
- HG2 H1 0.032 9 ; -0.061
- SD S -0.269 10 ; -0.3302
- CE CT -0.038 11 ; -0.3678
- HE1 H1 0.062 12 ; -0.3053
- HE2 H1 0.062 13 ; -0.2428
- HE3 H1 0.062 14 ; -0.1803
- C C 0.801 15 ; 0.621
- O O2 -0.810 16 ; -0.1895
- OXT O2 -0.810 17 ; -1
- [ bonds ]
-; ai aj
- -C N
- N H
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG SD
- SD CE
- CE HE1
- CE HE2
- CE HE3
- CA C
- C O
- C OXT
- [ dihedrals ]
-; ai aj ak al
- CB CA N -C ad_CT_CT_N__C__1
- CB CA N -C ad_CT_CT_N__C__2
- CB CA N -C ad_CT_CT_N__C__3
- [ impropers ]
-; ai aj ak al
- -C CA N H ai_X__X__N__H_
- CA OXT C O ai_X__O2_C__O2
-; end residue MET-C: 18 atoms, 18 bonds, 18 pdihs, 2 idihs
-
-; end of file /usr/slocal/amber6/dat/all_aminoct94.in
-; from file /usr/slocal/amber6/dat/all_aminont94.in
-;
-; reading database: All-atom, NH3+ terminal
-;
-; ALANINE
-;
-[ ALA-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.141 0 ; 0.1414
- H1 H 0.200 1 ; 0.3411
- H2 H 0.200 2 ; 0.5408
- H3 H 0.200 3 ; 0.7405
- CA CT 0.096 4 ; 0.8367
- HA HP 0.089 5 ; 0.9256
- CB CT -0.060 6 ; 0.8659
- HB1 HC 0.030 7 ; 0.8959
- HB2 HC 0.030 8 ; 0.9259
- HB3 HC 0.030 9 ; 0.9559
- C C 0.616 10 ; 1.5722
- O O -0.572 11 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB HB3
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
-; end residue ALA-N: 12 atoms, 11 bonds, 12 pdihs, 1 idihs
-
-; GLYCINE
-;
-[ GLY-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.294 0 ; 0.2943
- H1 H 0.164 1 ; 0.4585
- H2 H 0.164 2 ; 0.6227
- H3 H 0.164 3 ; 0.7869
- CA CT -0.010 4 ; 0.7769
- HA1 HP 0.089 5 ; 0.8664
- HA2 HP 0.089 6 ; 0.9559
- C C 0.616 7 ; 1.5722
- O O -0.572 8 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA1
- CA HA2
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
-; end residue GLY-N: 9 atoms, 8 bonds, 9 pdihs, 1 idihs
-
-; SERINE
-;
-[ SER-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.185 0 ; 0.1849
- H1 H 0.190 1 ; 0.3747
- H2 H 0.190 2 ; 0.5645
- H3 H 0.190 3 ; 0.7543
- CA CT 0.057 4 ; 0.811
- HA HP 0.078 5 ; 0.8892
- CB CT 0.260 6 ; 1.1488
- HB1 H1 0.027 7 ; 1.1761
- HB2 H1 0.027 8 ; 1.2034
- OG OH -0.671 9 ; 0.532
- HG HO 0.424 10 ; 0.9559
- C C 0.616 11 ; 1.5722
- O O -0.572 12 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB OG
- OG HG
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
-; end residue SER-N: 13 atoms, 12 bonds, 13 pdihs, 1 idihs
-
-; THREONINE
-;
-[ THR-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.181 0 ; 0.1812
- H1 H 0.193 1 ; 0.3746
- H2 H 0.193 2 ; 0.568
- H3 H 0.193 3 ; 0.7614
- CA CT 0.003 4 ; 0.7648
- HA HP 0.109 5 ; 0.8735
- CB CT 0.451 6 ; 1.3249
- HB H1 -0.032 7 ; 1.2926
- CG2 CT -0.255 8 ; 1.0372
- HG21 HC 0.063 9 ; 1.0999
- HG22 HC 0.063 10 ; 1.1626
- HG23 HC 0.063 11 ; 1.2253
- OG1 OH -0.676 12 ; 0.5489
- HG1 HO 0.407 13 ; 0.9559
- C C 0.616 14 ; 1.5722
- O O -0.572 15 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB
- CB CG2
- CG2 HG21
- CG2 HG22
- CG2 HG23
- CB OG1
- OG1 HG1
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
-; end residue THR-N: 16 atoms, 15 bonds, 16 pdihs, 1 idihs
-
-; LEUCINE
-;
-[ LEU-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.101 0 ; 0.101
- H1 H 0.215 1 ; 0.3158
- H2 H 0.215 2 ; 0.5306
- H3 H 0.215 3 ; 0.7454
- CA CT 0.010 4 ; 0.7558
- HA HP 0.105 5 ; 0.8611
- CB CT -0.024 6 ; 0.8367
- HB1 HC 0.026 7 ; 0.8623
- HB2 HC 0.026 8 ; 0.8879
- CG CT 0.342 9 ; 1.23
- HG HC -0.038 10 ; 1.192
- CD1 CT -0.411 11 ; 0.7814
- HD11 HC 0.098 12 ; 0.8794
- HD12 HC 0.098 13 ; 0.9774
- HD13 HC 0.098 14 ; 1.0754
- CD2 CT -0.410 15 ; 0.665
- HD21 HC 0.098 16 ; 0.763
- HD22 HC 0.098 17 ; 0.861
- HD23 HC 0.098 18 ; 0.959
- C C 0.612 19 ; 1.5713
- O O -0.571 20 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG
- CG CD1
- CD1 HD11
- CD1 HD12
- CD1 HD13
- CG CD2
- CD2 HD21
- CD2 HD22
- CD2 HD23
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
-; end residue LEU-N: 21 atoms, 20 bonds, 21 pdihs, 1 idihs
-
-; ISOLEUCINE
-;
-[ ILE-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.031 0 ; 0.0311
- H1 H 0.233 1 ; 0.264
- H2 H 0.233 2 ; 0.4969
- H3 H 0.233 3 ; 0.7298
- CA CT 0.026 4 ; 0.7555
- HA HP 0.103 5 ; 0.8586
- CB CT 0.189 6 ; 1.0471
- HB HC 0.021 7 ; 1.0684
- CG2 CT -0.372 8 ; 0.6964
- HG21 HC 0.095 9 ; 0.7911
- HG22 HC 0.095 10 ; 0.8858
- HG23 HC 0.095 11 ; 0.9805
- CG1 CT -0.039 12 ; 0.9418
- HG11 HC 0.020 13 ; 0.9619
- HG12 HC 0.020 14 ; 0.982
- CD1 CT -0.091 15 ; 0.8912
- HD11 HC 0.023 16 ; 0.9138
- HD12 HC 0.023 17 ; 0.9364
- HD13 HC 0.023 18 ; 0.959
- C C 0.612 19 ; 1.5713
- O O -0.571 20 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB
- CB CG2
- CG2 HG21
- CG2 HG22
- CG2 HG23
- CB CG1
- CG1 HG11
- CG1 HG12
- CG1 CD1
- CD1 HD11
- CD1 HD12
- CD1 HD13
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
-; end residue ILE-N: 21 atoms, 20 bonds, 21 pdihs, 1 idihs
-
-; VALINE
-;
-[ VAL-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.058 0 ; 0.0577
- H1 H 0.227 1 ; 0.2849
- H2 H 0.227 2 ; 0.5121
- H3 H 0.227 3 ; 0.7393
- CA CT -0.005 4 ; 0.7339
- HA HP 0.109 5 ; 0.8432
- CB CT 0.320 6 ; 1.1628
- HB HC -0.022 7 ; 1.1407
- CG1 CT -0.313 8 ; 0.8278
- HG11 HC 0.073 9 ; 0.9013
- HG12 HC 0.073 10 ; 0.9748
- HG13 HC 0.073 11 ; 1.0483
- CG2 CT -0.313 12 ; 0.7354
- HG21 HC 0.073 13 ; 0.8089
- HG22 HC 0.073 14 ; 0.8824
- HG23 HC 0.073 15 ; 0.9559
- C C 0.616 16 ; 1.5722
- O O -0.572 17 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB
- CB CG1
- CG1 HG11
- CG1 HG12
- CG1 HG13
- CB CG2
- CG2 HG21
- CG2 HG22
- CG2 HG23
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
-; end residue VAL-N: 18 atoms, 17 bonds, 18 pdihs, 1 idihs
-
-; ASPARAGINE
-;
-[ ASN-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.180 0 ; 0.1801
- H1 H 0.192 1 ; 0.3722
- H2 H 0.192 2 ; 0.5643
- H3 H 0.192 3 ; 0.7564
- CA CT 0.037 4 ; 0.7932
- HA HP 0.123 5 ; 0.9163
- CB CT -0.028 6 ; 0.888
- HB1 HC 0.051 7 ; 0.9395
- HB2 HC 0.051 8 ; 0.991
- CG C 0.583 9 ; 1.5743
- OD1 O -0.574 10 ; 0.9999
- ND2 N -0.863 11 ; 0.1365
- HD21 H 0.410 12 ; 0.5462
- HD22 H 0.410 13 ; 0.9559
- C C 0.616 14 ; 1.5722
- O O -0.572 15 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG OD1
- CG ND2
- ND2 HD21
- ND2 HD22
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
- CB ND2 CG OD1 ai_X__X__C__O_
- CG HD21 ND2 HD22 ai_X__X__N__H_
-; end residue ASN-N: 16 atoms, 15 bonds, 16 pdihs, 3 idihs
-
-; GLUTAMINE
-;
-[ GLN-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.149 0 ; 0.1493
- H1 H 0.200 1 ; 0.3489
- H2 H 0.200 2 ; 0.5485
- H3 H 0.200 3 ; 0.7481
- CA CT 0.054 4 ; 0.8017
- HA HP 0.102 5 ; 0.9032
- CB CT 0.065 6 ; 0.9683
- HB1 HC 0.005 7 ; 0.9733
- HB2 HC 0.005 8 ; 0.9783
- CG CT -0.090 9 ; 0.888
- HG1 HC 0.033 10 ; 0.9211
- HG2 HC 0.033 11 ; 0.9542
- CD C 0.735 12 ; 1.6896
- OE1 O -0.613 13 ; 1.0763
- NE2 N -1.003 14 ; 0.0732
- HE21 H 0.443 15 ; 0.5161
- HE22 H 0.443 16 ; 0.959
- C C 0.612 17 ; 1.5713
- O O -0.571 18 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD OE1
- CD NE2
- NE2 HE21
- NE2 HE22
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
- CG NE2 CD OE1 ai_X__X__C__O_
- CD HE21 NE2 HE22 ai_X__X__N__H_
-; end residue GLN-N: 19 atoms, 18 bonds, 19 pdihs, 3 idihs
-
-; ARGININE
-;
-[ ARG-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.131 0 ; 0.1305
- H1 H 0.208 1 ; 0.3388
- H2 H 0.208 2 ; 0.5471
- H3 H 0.208 3 ; 0.7554
- CA CT -0.022 4 ; 0.7331
- HA HP 0.124 5 ; 0.8573
- CB CT 0.012 6 ; 0.8691
- HB1 HC 0.023 7 ; 0.8917
- HB2 HC 0.023 8 ; 0.9143
- CG CT 0.024 9 ; 0.9379
- HG1 HC 0.031 10 ; 0.9688
- HG2 HC 0.031 11 ; 0.9997
- CD CT 0.093 12 ; 1.0932
- HD1 H1 0.053 13 ; 1.1459
- HD2 H1 0.053 14 ; 1.1986
- NE N2 -0.565 15 ; 0.6336
- HE H 0.359 16 ; 0.9928
- CZ CA 0.828 17 ; 1.8209
- NH1 N2 -0.869 18 ; 0.9516
- HH11 H 0.449 19 ; 1.401
- HH12 H 0.449 20 ; 1.8504
- NH2 N2 -0.869 21 ; 0.9811
- HH21 H 0.449 22 ; 1.4305
- HH22 H 0.449 23 ; 1.8799
- C C 0.721 24 ; 2.6013
- O O -0.601 25 ; 2
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD HD1
- CD HD2
- CD NE
- NE HE
- NE CZ
- CZ NH1
- NH1 HH11
- NH1 HH12
- CZ NH2
- NH2 HH21
- NH2 HH22
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
- NE NH1 CZ NH2 ai_X__N2_CA_N2
- CD CZ NE HE ai_X__X__N2_H_
- CZ HH11 NH1 HH12 ai_X__X__N2_H_
- CZ HH21 NH2 HH22 ai_X__X__N2_H_
-; end residue ARG-N: 26 atoms, 25 bonds, 26 pdihs, 5 idihs
-
-; HISTIDINE DELTAH
-;
-[ HID-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.154 0 ; 0.1542
- H1 H 0.196 1 ; 0.3505
- H2 H 0.196 2 ; 0.5468
- H3 H 0.196 3 ; 0.7431
- CA CT 0.096 4 ; 0.8395
- HA HP 0.096 5 ; 0.9353
- CB CT 0.026 6 ; 0.9612
- HB1 HC 0.021 7 ; 0.9821
- HB2 HC 0.021 8 ; 1.003
- CG CC -0.040 9 ; 0.9631
- ND1 NA -0.382 10 ; 0.5812
- HD1 H 0.363 11 ; 0.9444
- CE1 CR 0.213 12 ; 1.1571
- HE1 H5 0.139 13 ; 1.2956
- NE2 NB -0.571 14 ; 0.7245
- CD2 CV 0.105 15 ; 0.8291
- HD2 H4 0.130 16 ; 0.959
- C C 0.612 17 ; 1.5713
- O O -0.571 18 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG ND1
- ND1 HD1
- ND1 CE1
- CE1 HE1
- CE1 NE2
- NE2 CD2
- CD2 HD2
- CA C
- C O
- CG CD2
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
- CG CE1 ND1 HD1 ai_X__X__NA_H_
- CG NE2 CD2 HD2 ai_X__X__CV_H4
- ND1 NE2 CE1 HE1 ai_X__X__CR_H5
- ND1 CD2 CG CB ai_NA_CV_CC_CT
-; end residue HID-N: 19 atoms, 19 bonds, 19 pdihs, 5 idihs
-
-; HISTIDINE EPSILONH
-;
-[ HIE-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.147 0 ; 0.1472
- H1 H 0.202 1 ; 0.3488
- H2 H 0.202 2 ; 0.5504
- H3 H 0.202 3 ; 0.752
- CA CT 0.024 4 ; 0.7756
- HA HP 0.138 5 ; 0.9136
- CB CT 0.049 6 ; 0.9625
- HB1 HC 0.022 7 ; 0.9848
- HB2 HC 0.022 8 ; 1.0071
- CG CC 0.174 9 ; 1.1811
- ND1 NB -0.558 10 ; 0.6232
- CE1 CR 0.180 11 ; 0.8036
- HE1 H5 0.140 12 ; 0.9433
- NE2 NA -0.278 13 ; 0.6652
- HE2 H 0.332 14 ; 0.9976
- CD2 CW -0.235 15 ; 0.7627
- HD2 H4 0.196 16 ; 0.959
- C C 0.612 17 ; 1.5713
- O O -0.571 18 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG ND1
- ND1 CE1
- CE1 HE1
- CE1 NE2
- NE2 HE2
- NE2 CD2
- CD2 HD2
- CA C
- C O
- CG CD2
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
- CE1 CD2 NE2 HE2 ai_X__X__NA_H_
- CG NE2 CD2 HD2 ai_X__X__CW_H4
- ND1 NE2 CE1 HE1 ai_X__X__CR_H5
- ND1 CD2 CG CB ai_NB_CW_CC_CT
-; end residue HIE-N: 19 atoms, 19 bonds, 19 pdihs, 5 idihs
-
-; HISTIDINE PLUS
-;
-[ HIP-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.256 0 ; 0.256
- H1 H 0.170 1 ; 0.4264
- H2 H 0.170 2 ; 0.5968
- H3 H 0.170 3 ; 0.7672
- CA CT 0.058 4 ; 0.8253
- HA HP 0.105 5 ; 0.93
- CB CT 0.048 6 ; 0.9784
- HB1 HC 0.053 7 ; 1.0315
- HB2 HC 0.053 8 ; 1.0846
- CG CC -0.024 9 ; 1.061
- ND1 NA -0.151 10 ; 0.91
- HD1 H 0.382 11 ; 1.2921
- CE1 CR -0.001 12 ; 1.291
- HE1 H5 0.265 13 ; 1.5555
- NE2 NA -0.174 14 ; 1.3816
- HE2 H 0.392 15 ; 1.7737
- CD2 CW -0.143 16 ; 1.6304
- HD2 H4 0.249 17 ; 1.8799
- C C 0.721 18 ; 2.6013
- O O -0.601 19 ; 2
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG ND1
- ND1 HD1
- ND1 CE1
- CE1 HE1
- CE1 NE2
- NE2 HE2
- NE2 CD2
- CD2 HD2
- CA C
- C O
- CG CD2
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
- CG CE1 ND1 HD1 ai_X__X__NA_H_
- CE1 CD2 NE2 HE2 ai_X__X__NA_H_
- CG NE2 CD2 HD2 ai_X__X__CW_H4
- ND1 NE2 CE1 HE1 ai_X__X__CR_H5
- ND1 CD2 CG CB ai_NA_CW_CC_CT
-; end residue HIP-N: 20 atoms, 20 bonds, 20 pdihs, 6 idihs
-
-; TRYPTOPHAN
-;
-[ TRP-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.191 0 ; 0.1913
- H1 H 0.189 1 ; 0.3801
- H2 H 0.189 2 ; 0.5689
- H3 H 0.189 3 ; 0.7577
- CA CT 0.042 4 ; 0.7998
- HA HP 0.116 5 ; 0.916
- CB CT 0.054 6 ; 0.9703
- HB1 HC 0.022 7 ; 0.9925
- HB2 HC 0.022 8 ; 1.0147
- CG C* -0.165 9 ; 0.8493
- CD1 CW -0.179 10 ; 0.6705
- HD1 H4 0.220 11 ; 0.89
- NE1 NA -0.344 12 ; 0.5456
- HE1 H 0.341 13 ; 0.8868
- CE2 CN 0.158 14 ; 1.0443
- CZ2 CA -0.271 15 ; 0.7733
- HZ2 HA 0.159 16 ; 0.9322
- CH2 CA -0.108 17 ; 0.8242
- HH2 HA 0.141 18 ; 0.9653
- CZ3 CA -0.203 19 ; 0.7619
- HZ3 HA 0.146 20 ; 0.9077
- CE3 CA -0.227 21 ; 0.6812
- HE3 HA 0.165 22 ; 0.8458
- CD2 CB 0.113 23 ; 0.959
- C C 0.612 24 ; 1.5713
- O O -0.571 25 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG CD1
- CD1 HD1
- CD1 NE1
- NE1 HE1
- NE1 CE2
- CE2 CZ2
- CZ2 HZ2
- CZ2 CH2
- CH2 HH2
- CH2 CZ3
- CZ3 HZ3
- CZ3 CE3
- CE3 HE3
- CE3 CD2
- CA C
- C O
- CG CD2
- CE2 CD2
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
- CD1 CE2 NE1 HE1 ai_X__X__NA_H_
- CE2 CH2 CZ2 HZ2 ai_X__X__CA_HA
- CZ2 CZ3 CH2 HH2 ai_X__X__CA_HA
- CH2 CE3 CZ3 HZ3 ai_X__X__CA_HA
- CZ3 CD2 CE3 HE3 ai_X__X__CA_HA
- CG NE1 CD1 HD1 ai_X__X__CW_H4
- CD1 CD2 CG CB ai_CW_CB_C*_CT
-; end residue TRP-N: 26 atoms, 27 bonds, 26 pdihs, 8 idihs
-
-; PHENYLALANINE
-;
-[ PHE-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.174 0 ; 0.1737
- H1 H 0.192 1 ; 0.3658
- H2 H 0.192 2 ; 0.5579
- H3 H 0.192 3 ; 0.75
- CA CT 0.073 4 ; 0.8233
- HA HP 0.104 5 ; 0.9274
- CB CT 0.033 6 ; 0.9604
- HB1 HC 0.010 7 ; 0.9708
- HB2 HC 0.010 8 ; 0.9812
- CG CA 0.003 9 ; 0.9843
- CD1 CA -0.139 10 ; 0.8451
- HD1 HA 0.137 11 ; 0.9825
- CE1 CA -0.160 12 ; 0.8223
- HE1 HA 0.143 13 ; 0.9656
- CZ CA -0.121 14 ; 0.8448
- HZ HA 0.133 15 ; 0.9777
- CE2 CA -0.160 16 ; 0.8174
- HE2 HA 0.143 17 ; 0.9607
- CD2 CA -0.139 18 ; 0.8216
- HD2 HA 0.137 19 ; 0.959
- C C 0.612 20 ; 1.5713
- O O -0.571 21 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG CD1
- CD1 HD1
- CD1 CE1
- CE1 HE1
- CE1 CZ
- CZ HZ
- CZ CE2
- CE2 HE2
- CE2 CD2
- CD2 HD2
- CA C
- C O
- CG CD2
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
- CG CE2 CD2 HD2 ai_X__X__CA_HA
- CD2 CZ CE2 HE2 ai_X__X__CA_HA
- CE1 CE2 CZ HZ ai_X__X__CA_HA
- CD1 CZ CE1 HE1 ai_X__X__CA_HA
- CG CE1 CD1 HD1 ai_X__X__CA_HA
- CD1 CD2 CG CB ai_CA_CA_CA_CT
-; end residue PHE-N: 22 atoms, 22 bonds, 22 pdihs, 7 idihs
-
-; TYROSINE
-;
-[ TYR-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.194 0 ; 0.194
- H1 H 0.187 1 ; 0.3813
- H2 H 0.187 2 ; 0.5686
- H3 H 0.187 3 ; 0.7559
- CA CT 0.057 4 ; 0.8129
- HA HP 0.098 5 ; 0.9112
- CB CT 0.066 6 ; 0.9771
- HB1 HC 0.010 7 ; 0.9873
- HB2 HC 0.010 8 ; 0.9975
- CG CA -0.021 9 ; 0.977
- CD1 CA -0.200 10 ; 0.7768
- HD1 HA 0.172 11 ; 0.9488
- CE1 CA -0.224 12 ; 0.7249
- HE1 HA 0.165 13 ; 0.8899
- CZ C 0.314 14 ; 1.2038
- OH OH -0.558 15 ; 0.646
- HH HO 0.400 16 ; 1.0461
- CE2 CA -0.224 17 ; 0.8222
- HE2 HA 0.165 18 ; 0.9872
- CD2 CA -0.200 19 ; 0.787
- HD2 HA 0.172 20 ; 0.959
- C C 0.612 21 ; 1.5713
- O O -0.571 22 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG CD1
- CD1 HD1
- CD1 CE1
- CE1 HE1
- CE1 CZ
- CZ OH
- OH HH
- CZ CE2
- CE2 HE2
- CE2 CD2
- CD2 HD2
- CA C
- C O
- CG CD2
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
- CG CE2 CD2 HD2 ai_X__X__CA_HA
- CD2 CZ CE2 HE2 ai_X__X__CA_HA
- CD1 CZ CE1 HE1 ai_X__X__CA_HA
- CG CE1 CD1 HD1 ai_X__X__CA_HA
- CD1 CD2 CG CB ai_CA_CA_CA_CT
- CE1 CE2 CZ OH ai_CA_CA_C__OH
-; end residue TYR-N: 23 atoms, 23 bonds, 23 pdihs, 7 idihs
-
-; GLUTAMIC ACID
-;
-[ GLU-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.002 0 ; 0.0017
- H1 H 0.239 1 ; 0.2408
- H2 H 0.239 2 ; 0.4799
- H3 H 0.239 3 ; 0.719
- CA CT 0.059 4 ; 0.7778
- HA HP 0.120 5 ; 0.898
- CB CT 0.091 6 ; 0.9889
- HB1 HC -0.023 7 ; 0.9657
- HB2 HC -0.023 8 ; 0.9425
- CG CT -0.024 9 ; 0.9189
- HG1 HC -0.032 10 ; 0.8874
- HG2 HC -0.032 11 ; 0.8559
- CD C 0.809 12 ; 1.6646
- OE1 O2 -0.819 13 ; 0.8457
- OE2 O2 -0.819 14 ; 0.0268
- C C 0.562 15 ; 0.5889
- O O -0.589 16 ; 2.22045e-16
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD OE1
- CD OE2
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
- CG OE1 CD OE2 ai_X__O2_C__O2
-; end residue GLU-N: 17 atoms, 16 bonds, 17 pdihs, 2 idihs
-
-; ASPARTIC ACID
-;
-[ ASP-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.078 0 ; 0.0782
- H1 H 0.220 1 ; 0.2982
- H2 H 0.220 2 ; 0.5182
- H3 H 0.220 3 ; 0.7382
- CA CT 0.029 4 ; 0.7674
- HA HP 0.114 5 ; 0.8815
- CB CT -0.024 6 ; 0.858
- HB1 HC -0.017 7 ; 0.8411
- HB2 HC -0.017 8 ; 0.8242
- CG C 0.819 9 ; 1.6436
- OD1 O2 -0.808 10 ; 0.8352
- OD2 O2 -0.808 11 ; 0.0268
- C C 0.562 12 ; 0.5889
- O O -0.589 13 ; 0
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG OD1
- CG OD2
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
- CB OD1 CG OD2 ai_X__O2_C__O2
-; end residue ASP-N: 14 atoms, 13 bonds, 14 pdihs, 2 idihs
-
-; LYSINE
-;
-[ LYS-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.097 0 ; 0.0966
- H1 H 0.216 1 ; 0.3131
- H2 H 0.216 2 ; 0.5296
- H3 H 0.216 3 ; 0.7461
- CA CT -0.002 4 ; 0.7446
- HA HP 0.118 5 ; 0.8626
- CB CT 0.021 6 ; 0.8838
- HB1 HC 0.028 7 ; 0.9121
- HB2 HC 0.028 8 ; 0.9404
- CG CT -0.005 9 ; 0.9356
- HG1 HC 0.012 10 ; 0.9477
- HG2 HC 0.012 11 ; 0.9598
- CD CT -0.061 12 ; 0.899
- HD1 HC 0.063 13 ; 0.9623
- HD2 HC 0.063 14 ; 1.0256
- CE CT -0.018 15 ; 1.0075
- HE1 HP 0.117 16 ; 1.1246
- HE2 HP 0.117 17 ; 1.2417
- NZ N3 -0.376 18 ; 0.8653
- HZ1 H 0.338 19 ; 1.2035
- HZ2 H 0.338 20 ; 1.5417
- HZ3 H 0.338 21 ; 1.8799
- C C 0.721 22 ; 2.6013
- O O -0.601 23 ; 2
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG CD
- CD HD1
- CD HD2
- CD CE
- CE HE1
- CE HE2
- CE NZ
- NZ HZ1
- NZ HZ2
- NZ HZ3
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
-; end residue LYS-N: 24 atoms, 23 bonds, 24 pdihs, 1 idihs
-
-; PROLINE
-;
-[ PRO-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 -0.202 0 ; -0.202
- H1 H 0.312 1 ; 0.11
- H2 H 0.312 2 ; 0.422
- CD CT -0.012 3 ; 0.41
- HD1 HP 0.100 4 ; 0.51
- HD2 HP 0.100 5 ; 0.61
- CG CT -0.121 6 ; 0.489
- HG1 HC 0.100 7 ; 0.589
- HG2 HC 0.100 8 ; 0.689
- CB CT -0.115 9 ; 0.574
- HB1 HC 0.100 10 ; 0.674
- HB2 HC 0.100 11 ; 0.774
- CA CT 0.100 12 ; 0.874
- HA HP 0.100 13 ; 0.974
- C C 0.526 14 ; 1.5
- O O -0.500 15 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N CD
- CD HD1
- CD HD2
- CD CG
- CG HG1
- CG HG2
- CG CB
- CB HB1
- CB HB2
- N CA
- CA HA
- CA C
- C O
- CB CA
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
-; end residue PRO-N: 16 atoms, 16 bonds, 16 pdihs, 1 idihs
-
-; CYSTEINE
-;
-[ CYS-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.133 0 ; 0.1325
- H1 H 0.202 1 ; 0.3348
- H2 H 0.202 2 ; 0.5371
- H3 H 0.202 3 ; 0.7394
- CA CT 0.093 4 ; 0.8321
- HA HP 0.141 5 ; 0.9732
- CB CT -0.119 6 ; 0.8537
- HB1 H1 0.119 7 ; 0.9725
- HB2 H1 0.119 8 ; 1.0913
- SG SH -0.330 9 ; 0.7615
- HS1 HS 0.198 10 ; 0.959
- C C 0.612 11 ; 1.5713
- O O -0.571 12 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB SG
- SG HS1
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
-; end residue CYS-N: 13 atoms, 12 bonds, 13 pdihs, 1 idihs
-
-; CYSTINE(S-S BRIDGE)
-;
-[ CYX-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.207 0 ; 0.2069
- H1 H 0.181 1 ; 0.3884
- H2 H 0.181 2 ; 0.5699
- H3 H 0.181 3 ; 0.7514
- CA CT 0.105 4 ; 0.8569
- HA HP 0.092 5 ; 0.9491
- CB CT -0.028 6 ; 0.9214
- HB1 H1 0.068 7 ; 0.9894
- HB2 H1 0.068 8 ; 1.0574
- SG S -0.098 9 ; 0.959
- C C 0.612 10 ; 1.5713
- O O -0.571 11 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB SG
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
-; end residue CYX-N: 12 atoms, 11 bonds, 12 pdihs, 1 idihs
-
-; METHIONINE
-;
-[ MET-N ]
- [ atoms ]
-;name type charge cg ; qtot
- N N3 0.159 0 ; 0.1592
- H1 H 0.198 1 ; 0.3576
- H2 H 0.198 2 ; 0.556
- H3 H 0.198 3 ; 0.7544
- CA CT 0.022 4 ; 0.7765
- HA HP 0.112 5 ; 0.8881
- CB CT 0.086 6 ; 0.9746
- HB1 HC 0.013 7 ; 0.9871
- HB2 HC 0.013 8 ; 0.9996
- CG CT 0.033 9 ; 1.033
- HG1 H1 0.029 10 ; 1.0622
- HG2 H1 0.029 11 ; 1.0914
- SD S -0.277 12 ; 0.814
- CE CT -0.034 13 ; 0.7799
- HE1 H1 0.060 14 ; 0.8396
- HE2 H1 0.060 15 ; 0.8993
- HE3 H1 0.060 16 ; 0.959
- C C 0.612 17 ; 1.5713
- O O -0.571 18 ; 1
- [ bonds ]
-; ai aj
- N H1
- N H2
- N H3
- N CA
- CA HA
- CA CB
- CB HB1
- CB HB2
- CB CG
- CG HG1
- CG HG2
- CG SD
- SD CE
- CE HE1
- CE HE2
- CE HE3
- CA C
- C O
- [ impropers ]
-; ai aj ak al
- CA +N C O ai_X__X__C__O_
-; end residue MET-N: 19 atoms, 18 bonds, 19 pdihs, 1 idihs
-
-; end of file /usr/slocal/amber6/dat/all_aminont94.in
-; Found 79 residues
+++ /dev/null
-; Amber forcefield converted to Gromacs
-; from file /usr/slocal/amber6/dat/parm98.dat
-
-; PARM94 for DNA, RNA and proteins with TIP3P Water. USE SCEE=1.2 in energy progs
-;
-
-[ bondtypes ]
-; ai aj ft b0 kb
-; (nm) (kj/mol/nm2)
- OW HW 1 0.09572 231530 ; TIP3P water
- HW HW 1 0.15136 231530 ; TIP3P water
- C CA 1 0.1409 196361 ; JCC,7,(1986),230; TYR
- C CB 1 0.1419 187150 ; JCC,7,(1986),230; GUA
- C CM 1 0.1444 171659 ; JCC,7,(1986),230; THY,URA
- C CT 1 0.1522 132722 ; JCC,7,(1986),230; AA
- C N* 1 0.1383 177520 ; JCC,7,(1986),230; CYT,URA
- C NA 1 0.1388 175008 ; JCC,7,(1986),230; GUA.URA
- C NC 1 0.1358 191337 ; JCC,7,(1986),230; CYT
- C O 1 0.1229 238648 ; JCC,7,(1986),230; AA,CYT,GUA,THY,URA
- C O2 1 0.125 274654 ; JCC,7,(1986),230; GLU,ASP
- C OH 1 0.1364 188406 ; JCC,7,(1986),230; TYR
- CA CA 1 0.14 196361 ; JCC,7,(1986),230; BENZENE,PHE,TRP,TYR
- CA CB 1 0.1404 196361 ; JCC,7,(1986),230; ADE,TRP
- CA CM 1 0.1433 178776 ; JCC,7,(1986),230; CYT
- CA CT 1 0.151 132722 ; JCC,7,(1986),230; PHE,TYR
- CA HA 1 0.108 153656 ; changed from 340. bsd on C6H6 nmodes; PHE,TRP,TYR
- CA H4 1 0.108 153656 ; changed from 340. bsd on C6H6 nmodes; no assigned
- CA N2 1 0.134 201385 ; JCC,7,(1986),230; ARG,CYT,GUA
- CA NA 1 0.1381 178776 ; JCC,7,(1986),230; GUA
- CA NC 1 0.1339 202222 ; JCC,7,(1986),230; ADE,CYT,GUA
- CB CB 1 0.137 217714 ; JCC,7,(1986),230; ADE,GUA
- CB N* 1 0.1374 182544 ; JCC,7,(1986),230; ADE,GUA
- CB NB 1 0.1391 173334 ; JCC,7,(1986),230; ADE,GUA
- CB NC 1 0.1354 193011 ; JCC,7,(1986),230; ADE,GUA
- CK H5 1 0.108 153656 ; changed from 340. bsd on C6H6 nmodes; ADE,GUA
- CK N* 1 0.1371 184219 ; JCC,7,(1986),230; ADE,GUA
- CK NB 1 0.1304 221482 ; JCC,7,(1986),230; ADE,GUA
- CM CM 1 0.135 229855 ; JCC,7,(1986),230; CYT,THY,URA
- CM CT 1 0.151 132722 ; JCC,7,(1986),230; THY
- CM HA 1 0.108 153656 ; changed from 340. bsd on C6H6 nmodes; CYT,URA
- CM H4 1 0.108 153656 ; changed from 340. bsd on C6H6 nmodes; CYT,URA
- CM H5 1 0.108 153656 ; changed from 340. bsd on C6H6 nmodes; not assigned
- CM N* 1 0.1365 187569 ; JCC,7,(1986),230; CYT,THY,URA
- CQ H5 1 0.108 153656 ; changed from 340. bsd on C6H6 nmodes; ADE
- CQ NC 1 0.1324 210177 ; JCC,7,(1986),230; ADE
- CT CT 1 0.1526 129791 ; JCC,7,(1986),230; AA, SUGARS
- CT HC 1 0.109 142351 ; changed from 331 bsd on NMA nmodes; AA, SUGARS
- CT H1 1 0.109 142351 ; changed from 331 bsd on NMA nmodes; AA, RIBOSE
- CT H2 1 0.109 142351 ; changed from 331 bsd on NMA nmodes; SUGARS
- CT H3 1 0.109 142351 ; changed from 331 bsd on NMA nmodes; not assigned
- CT HP 1 0.109 142351 ; changed from 331; AA-lysine, methyl ammonium cation
- CT N* 1 0.1475 141095 ; JCC,7,(1986),230; ADE,CYT,GUA,THY,URA
- CT N2 1 0.1463 141095 ; JCC,7,(1986),230; ARG
- CT OH 1 0.141 133978 ; JCC,7,(1986),230; SUGARS
- CT OS 1 0.141 133978 ; JCC,7,(1986),230; NUCLEIC ACIDS
- H N2 1 0.101 181707 ; JCC,7,(1986),230; ADE,CYT,GUA,ARG
- H N* 1 0.101 181707 ; for plain unmethylated bases ADE,CYT,GUA,ARG
- H NA 1 0.101 181707 ; JCC,7,(1986),230; GUA,URA,HIS
- HO OH 1 0.096 231530 ; JCC,7,(1986),230; SUGARS,SER,TYR
- HO OS 1 0.096 231530 ; JCC,7,(1986),230; NUCLEOTIDE ENDS
- O2 P 1 0.148 219807 ; JCC,7,(1986),230; NA PHOSPHATES
- OH P 1 0.161 96296.4 ; JCC,7,(1986),230; NA PHOSPHATES
- OS P 1 0.161 96296.4 ; JCC,7,(1986),230; NA PHOSPHATES
- C* HC 1 0.108 153656 ; changed from 340. bsd on C6H6 nmodes, not needed AA
- C N 1 0.1335 205153 ; JCC,7,(1986),230; AA
- C* CB 1 0.1459 162448 ; JCC,7,(1986),230; TRP
- C* CT 1 0.1495 132722 ; JCC,7,(1986),230; TRP
- C* CW 1 0.1352 228599 ; JCC,7,(1986),230; TRP
- CA CN 1 0.14 196361 ; JCC,7,(1986),230; TRP
- CB CN 1 0.1419 187150 ; JCC,7,(1986),230; TRP
- CC CT 1 0.1504 132722 ; JCC,7,(1986),230; HIS
- CC CV 1 0.1375 214364 ; JCC,7,(1986),230; HIS(delta)
- CC CW 1 0.1371 216876 ; JCC,7,(1986),230; HIS(epsilon)
- CC NA 1 0.1385 176683 ; JCC,7,(1986),230; HIS
- CC NB 1 0.1394 171659 ; JCC,7,(1986),230; HIS
- CN NA 1 0.138 179195 ; JCC,7,(1986),230; TRP
- CR H5 1 0.108 153656 ; changed from 340. bsd on C6H6 nmodes;HIS
- CR NA 1 0.1343 199710 ; JCC,7,(1986),230; HIS
- CR NB 1 0.1335 204316 ; JCC,7,(1986),230; HIS
- CT N 1 0.1449 141095 ; JCC,7,(1986),230; AA
- CT N3 1 0.1471 153656 ; JCC,7,(1986),230; LYS
- CT S 1 0.181 95040.4 ; changed from 222.0 based on dimethylS nmodes
- CT SH 1 0.181 99227.2 ; changed from 222.0 based on methanethiol nmodes
- CV H4 1 0.108 153656 ; changed from 340. bsd on C6H6 nmodes; HIS
- CV NB 1 0.1394 171659 ; JCC,7,(1986),230; HIS
- CW H4 1 0.108 153656 ; changed from 340. bsd on C6H6 nmodes;HIS(epsilon,+)
- CW NA 1 0.1381 178776 ; JCC,7,(1986),230; HIS,TRP
- H N 1 0.101 181707 ; JCC,7,(1986),230; AA
- H N3 1 0.101 181707 ; JCC,7,(1986),230; LYS
- HS SH 1 0.1336 114718 ; JCC,7,(1986),230; CYS
- S S 1 0.2038 69500.9 ; JCC,7,(1986),230; CYX (SCHERAGA)
- CT F 1 0.138 153656 ; JCC,13,(1992),963;CF4; R0=1.332 FOR CHF3
-
-[ angletypes ]
-; ai aj ak ft th0 cth
-; (degr) (kj/mol/rad2)
- HW OW HW 1 104.52 418.68 ; TIP3P water
- HW HW OW 1 127.74 0 ; (found in crystallographic water with 3 bonds)
- CB C NA 1 111.3 293.076 ; NA
- CB C O 1 128.8 334.944 ;
- CM C NA 1 114.1 293.076 ;
- CM C O 1 125.3 334.944 ;
- CT C O 1 120.4 334.944 ;
- CT C O2 1 117 293.076 ;
- CT C OH 1 117 293.076 ;
- N* C NA 1 115.4 293.076 ;
- N* C NC 1 118.6 293.076 ;
- N* C O 1 120.9 334.944 ;
- NA C O 1 120.6 334.944 ;
- NC C O 1 122.5 334.944 ;
- CT C N 1 116.6 293.076 ; AA general
- N C O 1 122.9 334.944 ; AA general
- O C O 1 126 334.944 ; AA COO- terminal residues
- O2 C O2 1 126 334.944 ; AA GLU (SCH JPC 79,2379)
- O C OH 1 126 334.944 ;
- CA C CA 1 120 263.768 ; changed from 85.0 bsd on C6H6 nmodes; AA tyr
- CA C OH 1 120 293.076 ; AA tyr
- C CA CA 1 120 263.768 ; changed from 85.0 bsd on C6H6 nmodes
- CA CA CA 1 120 263.768 ; changed from 85.0 bsd on C6H6 nmodes
- CA CA CB 1 120 263.768 ; changed from 85.0 bsd on C6H6 nmodes
- CA CA CT 1 120 293.076 ;
- CA CA HA 1 120 146.538 ;
- CA CA H4 1 120 146.538 ;
- CB CA HA 1 120 146.538 ;
- CB CA H4 1 120 146.538 ;
- CB CA N2 1 123.5 293.076 ;
- CB CA NC 1 117.3 293.076 ;
- CM CA N2 1 120.1 293.076 ;
- CM CA NC 1 121.5 293.076 ;
- N2 CA NA 1 116 293.076 ;
- N2 CA NC 1 119.3 293.076 ;
- NA CA NC 1 123.3 293.076 ;
- C CA HA 1 120 146.538 ; AA tyr
- N2 CA N2 1 120 293.076 ; AA arg
- CN CA HA 1 120 146.538 ; AA trp
- CA CA CN 1 120 263.768 ; changed from 85.0 bsd on C6H6 nmodes; AA trp
- C CB CB 1 119.2 263.768 ; changed from 85.0 bsd on C6H6 nmodes; NA gua
- C CB NB 1 130 293.076 ;
- CA CB CB 1 117.3 263.768 ; changed from 85.0 bsd on C6H6 nmodes; NA ade
- CA CB NB 1 132.4 293.076 ;
- CB CB N* 1 106.2 293.076 ;
- CB CB NB 1 110.4 293.076 ;
- CB CB NC 1 127.7 293.076 ;
- N* CB NC 1 126.2 293.076 ;
- C* CB CA 1 134.9 263.768 ; changed from 85.0 bsd on C6H6 nmodes; AA trp
- C* CB CN 1 108.8 263.768 ; changed from 85.0 bsd on C6H6 nmodes; AA trp
- CA CB CN 1 116.2 263.768 ; changed from 85.0 bsd on C6H6 nmodes; AA trp
- H5 CK N* 1 123.05 146.538 ;
- H5 CK NB 1 123.05 146.538 ;
- N* CK NB 1 113.9 293.076 ;
- C CM CM 1 120.7 263.768 ; changed from 85.0 bsd on C6H6 nmodes; NA thy
- C CM CT 1 119.7 293.076 ;
- C CM HA 1 119.7 146.538 ;
- C CM H4 1 119.7 146.538 ;
- CA CM CM 1 117 263.768 ; changed from 85.0 bsd on C6H6 nmodes; NA cyt
- CA CM HA 1 123.3 146.538 ;
- CA CM H4 1 123.3 146.538 ;
- CM CM CT 1 119.7 293.076 ;
- CM CM HA 1 119.7 146.538 ;
- CM CM H4 1 119.7 146.538 ;
- CM CM N* 1 121.2 293.076 ;
- H4 CM N* 1 119.1 146.538 ;
- H5 CQ NC 1 115.45 146.538 ;
- NC CQ NC 1 129.1 293.076 ;
- CM CT HC 1 109.5 209.34 ; changed based on NMA nmodes
- CT CT CT 1 109.5 167.472 ;
- CT CT HC 1 109.5 209.34 ; changed based on NMA nmodes
- CT CT H1 1 109.5 209.34 ; changed based on NMA nmodes
- CT CT H2 1 109.5 209.34 ; changed based on NMA nmodes
- CT CT HP 1 109.5 209.34 ; changed based on NMA nmodes
- CT CT N* 1 109.5 209.34 ;
- CT CT OH 1 109.5 209.34 ;
- CT CT OS 1 109.5 209.34 ;
- HC CT HC 1 109.5 146.538 ;
- H1 CT H1 1 109.5 146.538 ;
- HP CT HP 1 109.5 146.538 ; AA lys, ch3nh4+
- H2 CT N* 1 109.5 209.34 ; changed based on NMA nmodes
- H1 CT N* 1 109.5 209.34 ; changed based on NMA nmodes
- H1 CT OH 1 109.5 209.34 ; changed based on NMA nmodes
- H1 CT OS 1 109.5 209.34 ; changed based on NMA nmodes
- H2 CT OS 1 109.5 209.34 ; changed based on NMA nmodes
- N* CT OS 1 109.5 209.34 ;
- H1 CT N 1 109.5 209.34 ; AA general changed based on NMA nmodes
- C CT H1 1 109.5 209.34 ; AA general changed based on NMA nmodes
- C CT HP 1 109.5 209.34 ; AA zwitterion changed based on NMA nmodes
- H1 CT S 1 109.5 209.34 ; AA cys changed based on NMA nmodes
- H1 CT SH 1 109.5 209.34 ; AA cyx changed based on NMA nmodes
- CT CT S 1 114.7 209.34 ; AA cyx (SCHERAGA JPC 79,1428)
- CT CT SH 1 108.6 209.34 ; AA cys
- H2 CT H2 1 109.5 146.538 ; AA lys
- H1 CT N2 1 109.5 209.34 ; AA arg changed based on NMA nmodes
- HP CT N3 1 109.5 209.34 ; AA lys, ch3nh3+, changed based on NMA nmodes
- CA CT CT 1 114 263.768 ; AA phe tyr (SCH JPC 79,2379)
- C CT HC 1 109.5 209.34 ; AA gln changed based on NMA nmodes
- C CT N 1 110.1 263.768 ; AA general
- CT CT N2 1 111.2 334.944 ; AA arg (JCP 76, 1439)
- CT CT N 1 109.7 334.944 ; AA ala, general (JACS 94, 2657)
- C CT CT 1 111.1 263.768 ; AA general
- CA CT HC 1 109.5 209.34 ; AA tyr changed based on NMA nmodes
- CT CT N3 1 111.2 334.944 ; AA lys (JCP 76, 1439)
- CC CT CT 1 113.1 263.768 ; AA his
- CC CT HC 1 109.5 209.34 ; AA his changed based on NMA nmodes
- C CT N3 1 111.2 334.944 ; AA amino terminal residues
- C* CT CT 1 115.6 263.768 ; AA trp
- C* CT HC 1 109.5 209.34 ; AA trp changed based on NMA nmodes
- CT CC NA 1 120 293.076 ; AA his
- CT CC CV 1 120 293.076 ; AA his
- CT CC NB 1 120 293.076 ; AA his
- CV CC NA 1 120 293.076 ; AA his
- CW CC NA 1 120 293.076 ; AA his
- CW CC NB 1 120 293.076 ; AA his
- CT CC CW 1 120 293.076 ; AA his
- H5 CR NA 1 120 146.538 ; AA his
- H5 CR NB 1 120 146.538 ; AA his
- NA CR NA 1 120 293.076 ; AA his
- NA CR NB 1 120 293.076 ; AA his
- CC CV H4 1 120 146.538 ; AA his
- CC CV NB 1 120 293.076 ; AA his
- H4 CV NB 1 120 146.538 ; AA his
- CC CW H4 1 120 146.538 ; AA his
- CC CW NA 1 120 293.076 ; AA his
- H4 CW NA 1 120 146.538 ; AA his
- C* CW H4 1 120 146.538 ; AA trp
- C* CW NA 1 108.7 293.076 ; AA trp
- CT C* CW 1 125 293.076 ; AA trp
- CB C* CT 1 128.6 293.076 ; AA trp
- CB C* CW 1 106.4 263.768 ; changed from 85.0 bsd on C6H6 nmodes; AA trp
- CA CN NA 1 132.8 293.076 ; AA trp
- CB CN NA 1 104.4 293.076 ; AA trp
- CA CN CB 1 122.7 263.768 ; changed from 85.0 bsd on C6H6 nmodes; AA trp
- C N CT 1 121.9 209.34 ; AA general
- C N H 1 120 125.604 ; AA general, gln, asn,changed based on NMA nmodes
- CT N H 1 118.04 125.604 ; AA general, changed based on NMA nmodes
- CT N CT 1 118 209.34 ; AA pro (DETAR JACS 99,1232)
- H N H 1 120 146.538 ; ade,cyt,gua,gln,asn **
- C N* CM 1 121.6 293.076 ;
- C N* CT 1 117.6 293.076 ;
- C N* H 1 119.2 125.604 ; changed based on NMA nmodes
- CB N* CK 1 105.4 293.076 ;
- CB N* CT 1 125.8 293.076 ;
- CB N* H 1 125.8 125.604 ; for unmethylated n.a. bases,chngd bsd NMA nmodes
- CK N* CT 1 128.8 293.076 ;
- CK N* H 1 128.8 125.604 ; for unmethylated n.a. bases,chngd bsd NMA nmodes
- CM N* CT 1 121.2 293.076 ;
- CM N* H 1 121.2 125.604 ; for unmethylated n.a. bases,chngd bsd NMA nmodes
- CA N2 H 1 120 146.538 ;
- H N2 H 1 120 146.538 ;
- CT N2 H 1 118.4 146.538 ; AA arg
- CA N2 CT 1 123.2 209.34 ; AA arg
- CT N3 H 1 109.5 209.34 ; AA lys, changed based on NMA nmodes
- CT N3 CT 1 109.5 209.34 ; AA pro/nt
- H N3 H 1 109.5 146.538 ; AA lys, AA(end)
- C NA C 1 126.4 293.076 ;
- C NA CA 1 125.2 293.076 ;
- C NA H 1 116.8 125.604 ; changed based on NMA nmodes
- CA NA H 1 118 125.604 ; changed based on NMA nmodes
- CC NA CR 1 120 293.076 ; AA his
- CC NA H 1 120 125.604 ; AA his, changed based on NMA nmodes
- CR NA CW 1 120 293.076 ; AA his
- CR NA H 1 120 125.604 ; AA his, changed based on NMA nmodes
- CW NA H 1 120 125.604 ; AA his, changed based on NMA nmodes
- CN NA CW 1 111.6 293.076 ; AA trp
- CN NA H 1 123.1 125.604 ; AA trp, changed based on NMA nmodes
- CB NB CK 1 103.8 293.076 ;
- CC NB CR 1 117 293.076 ; AA his
- CR NB CV 1 117 293.076 ; AA his
- C NC CA 1 120.5 293.076 ;
- CA NC CB 1 112.2 293.076 ;
- CA NC CQ 1 118.6 293.076 ;
- CB NC CQ 1 111 293.076 ;
- C OH HO 1 113 146.538 ;
- CT OH HO 1 108.5 230.274 ;
- HO OH P 1 108.5 188.406 ;
- CT OS CT 1 109.5 251.208 ;
- CT OS P 1 120.5 418.68 ;
- P OS P 1 120.5 418.68 ;
- O2 P OH 1 108.23 188.406 ;
- O2 P O2 1 119.9 586.152 ;
- O2 P OS 1 108.23 418.68 ;
- OH P OS 1 102.6 188.406 ;
- OS P OS 1 102.6 188.406 ;
- CT S CT 1 98.9 259.582 ; AA met
- CT S S 1 103.7 284.702 ; AA cyx (SCHERAGA JPC 79,1428)
- CT SH HS 1 96 180.032 ; changed from 44.0 based on methanethiol nmodes
- HS SH HS 1 92.07 146.538 ; AA cys
- F CT F 1 109.1 322.384 ; JCC,13,(1992),963;
- F CT H1 1 109.5 146.538 ; JCC,13,(1992),963;
-
-[ dihedraltypes ]
-; aj ak ft phi0 cp mult
-; (degr) (kJ/mol/rad)
- C CA 1 180 15.1771 2 ; intrpol.bsd.on C6H6
- C CB 1 180 12.5604 2 ; intrpol.bsd.on C6H6
- C CM 1 180 9.10629 2 ; intrpol.bsd.on C6H6
- C N* 1 180 6.07086 2 ; JCC,7,(1986),230
- C NA 1 180 5.65218 2 ; JCC,7,(1986),230
- C NC 1 180 16.7472 2 ; JCC,7,(1986),230
- C OH 1 180 3.76812 2 ; JCC,7,(1986),230
- C CT 1 0 0 2 ; JCC,7,(1986),230
- CA CA 1 180 15.1771 2 ; intrpol.bsd.on C6H6
- CA CB 1 180 14.6538 2 ; intrpol.bsd.on C6H6
- CA CM 1 180 10.6763 2 ; intrpol.bsd.on C6H6
- CA CT 1 0 0 2 ; JCC,7,(1986),230
- CA N2 1 180 10.0483 2 ; reinterpolated 93'
- CA NA 1 180 6.2802 2 ; JCC,7,(1986),230
- CA NC 1 180 20.0966 2 ; JCC,7,(1986),230
- CB CB 1 180 22.8181 2 ; intrpol.bsd.on C6H6
- CB N* 1 180 6.90822 2 ; JCC,7,(1986),230
- CB NB 1 180 10.6763 2 ; JCC,7,(1986),230
- CB NC 1 180 17.3752 2 ; JCC,7,(1986),230
- CK N* 1 180 7.11756 2 ; JCC,7,(1986),230
- CK NB 1 180 41.868 2 ; JCC,7,(1986),230
- CM CM 1 180 27.8422 2 ; intrpol.bsd.on C6H6
- CM CT 1 0 0 3 ; JCC,7,(1986),230
- CM N* 1 180 7.74558 2 ; JCC,7,(1986),230
- CQ NC 1 180 28.4702 2 ; JCC,7,(1986),230
- CT CT 1 0 0.65128 3 ; JCC,7,(1986),230
- CT N 1 0 0 2 ; JCC,7,(1986),230
- CT N* 1 0 0 2 ; JCC,7,(1986),230
- CT N2 1 0 0 3 ; JCC,7,(1986),230
- CT OH 1 0 0.6978 3 ; JCC,7,(1986),230
- CT OS 1 0 1.60494 3 ; JCC,7,(1986),230
- OH P 1 0 1.0467 3 ; JCC,7,(1986),230
- OS P 1 0 1.0467 3 ; JCC,7,(1986),230
- C N 1 180 10.467 2 ; AA|check Wendy?&NMA
- CT N3 1 0 0.65128 3 ; JCC,7,(1986),230
- CT S 1 0 1.3956 3 ; JCC,7,(1986),230
- CT SH 1 0 1.0467 3 ; JCC,7,(1986),230
- C* CB 1 180 7.01289 2 ; intrpol.bsd.onC6H6aa
- C* CT 1 0 0 2 ; JCC,7,(1986),230
- C* CW 1 180 27.3189 2 ; intrpol.bsd.on C6H6
- CA CN 1 180 15.1771 2 ; reinterpolated 93'
- CB CN 1 180 12.5604 2 ; reinterpolated 93'
- CC CT 1 0 0 2 ; JCC,7,(1986),230
- CC CV 1 180 21.562 2 ; intrpol.bsd.on C6H6
- CC CW 1 180 22.504 2 ; intrpol.bsd.on C6H6
- CC NA 1 180 5.86152 2 ; JCC,7,(1986),230
- CC NB 1 180 10.0483 2 ; JCC,7,(1986),230
- CN NA 1 180 6.38487 2 ; reinterpolated 93'
- CR NA 1 180 9.73431 2 ; JCC,7,(1986),230
- CR NB 1 180 20.934 2 ; JCC,7,(1986),230
- CV NB 1 180 10.0483 2 ; JCC,7,(1986),230
- CW NA 1 180 6.2802 2 ; JCC,7,(1986),230
-
-; defining dihedral parameters for four-atom dependent
-; dihedral types, which Gromacs does not handle by default
-#define ad_CT_CT_OS_CT_1 0 1.60354 3 0 1.60354 3
-#define ad_CT_CT_OS_CT_2 180 0.41868 2 180 0.41868 2
-#define ad_CT_OS_CT_N*_1 0 1.60354 3 0 1.60354 3
-#define ad_CT_OS_CT_N*_2 0 4.1868 2 0 4.1868 2
-#define ad_C__N__CT_C_ 180 0.83736 2 180 0.83736 2
-#define ad_N__CT_C__N__1 180 1.67472 4 180 1.67472 4
-#define ad_N__CT_C__N__2 180 5.65218 2 180 5.65218 2
-#define ad_N__CT_C__N__3 180 3.1401 1 180 3.1401 1
-#define ad_CT_CT_N__C__1 180 2.0934 4 180 2.0934 4
-#define ad_CT_CT_N__C__2 180 0.62802 3 180 0.62802 3
-#define ad_CT_CT_N__C__3 0 2.219 1 0 2.219 1
-#define ad_CT_CT_C__N__1 0 0.41868 4 0 0.41868 4
-#define ad_CT_CT_C__N__2 0 0.293076 2 0 0.293076 2
-#define ad_H__N__C__O__1 180 10.467 2 180 10.467 2 ; JCC,7,(1986),230
-#define ad_H__N__C__O__2 0 8.3736 1 0 8.3736 1 ; J.C.cistrans-NMA DE
-#define ad_CT_S__S__CT_1 0 14.6538 2 0 14.6538 2 ; JCC,7,(1986),230
-#define ad_CT_S__S__CT_2 0 2.51208 3 0 2.51208 3 ; JCC,7,(1986),230
-#define ad_OS_CT_CT_OS_1 0 0.602899 3 0 0.602899 3 ; JCC,7,(1986),230
-#define ad_OS_CT_CT_OS_2 0 6.2802 2 0 6.2802 2 ; pucker anal (93')
-#define ad_OS_CT_CT_OH_1 0 0.602899 3 0 0.602899 3 ; JCC,7,(1986),230
-#define ad_OS_CT_CT_OH_2 0 6.2802 2 0 6.2802 2 ; pucker anal (93')
-#define ad_OH_CT_CT_OH_1 0 0.602899 3 0 0.602899 3 ; JCC,7,(1986),230
-#define ad_OH_CT_CT_OH_2 0 6.2802 2 0 6.2802 2 ; check glicolWC? puc
-#define ad_OH_P__OS_CT_1 0 1.0467 3 0 1.0467 3 ; JCC,7,(1986),230
-#define ad_OH_P__OS_CT_2 0 5.02416 2 0 5.02416 2 ; gg> ene.631g*/mp2
-#define ad_OS_P__OS_CT_1 0 1.0467 3 0 1.0467 3 ; JCC,7,(1986),230
-#define ad_OS_P__OS_CT_2 0 5.02416 2 0 5.02416 2 ; gg> ene.631g*/mp2
-#define ad_OS_CT_N*_CK_1 0 0 2 0 0 2 ; sugar frag calc (PC)
-#define ad_OS_CT_N*_CK_2 0 10.467 1 0 10.467 1 ; sugar frag calc (PC)
-#define ad_OS_CT_N*_CM_1 0 0 2 0 0 2 ; sugar frag calc (PC)
-#define ad_OS_CT_N*_CM_2 0 10.467 1 0 10.467 1 ; sugar frag calc (PC)
-
-; ai aj ak al ft q0 cq mult
-; WARNING: using Gromacs propers to define Amber impropers
-; defining improper parameters for improper types
-#define ai_X__X__C__O_ 43.9614 180 2 43.9614 180 2 ; JCC,7,(1986),230
-#define ai_X__O2_C__O2 43.9614 180 2 43.9614 180 2 ; JCC,7,(1986),230
-#define ai_X__X__N__H_ 4.1868 180 2 4.1868 180 2 ; JCC,7,(1986),230
-#define ai_X__X__N2_H_ 4.1868 180 2 4.1868 180 2 ; JCC,7,(1986),230
-#define ai_X__X__NA_H_ 4.1868 180 2 4.1868 180 2 ; JCC,7,(1986),230
-#define ai_X__N2_CA_N2 43.9614 180 2 43.9614 180 2 ; JCC,7,(1986),230
-#define ai_X__CT_N__CT 4.1868 180 2 4.1868 180 2 ; JCC,7,(1986),230
-#define ai_X__X__CA_HA 4.60548 180 2 4.60548 180 2 ; bsd.on C6H6 nmodes
-#define ai_X__X__CW_H4 4.60548 180 2 4.60548 180 2
-#define ai_X__X__CR_H5 4.60548 180 2 4.60548 180 2
-#define ai_X__X__CV_H4 4.60548 180 2 4.60548 180 2
-#define ai_X__X__CQ_H5 4.60548 180 2 4.60548 180 2
-#define ai_X__X__CK_H5 4.60548 180 2 4.60548 180 2
-#define ai_X__X__CM_H4 4.60548 180 2 4.60548 180 2
-#define ai_X__X__CM_HA 4.60548 180 2 4.60548 180 2
-#define ai_X__X__CA_H4 4.60548 180 2 4.60548 180 2 ; bsd.on C6H6 nmodes
-#define ai_X__X__CA_H5 4.60548 180 2 4.60548 180 2 ; bsd.on C6H6 nmodes
-#define ai_CK_CB_N*_CT 4.1868 180 2 4.1868 180 2
-#define ai_CM_C__N*_CT 4.1868 180 2 4.1868 180 2 ; dac guess, 9/94
-#define ai_CM_C__CM_CT 4.60548 180 2 4.60548 180 2
-#define ai_CT_O__C__OH 43.9614 180 2 43.9614 180 2
-#define ai_NA_CV_CC_CT 4.60548 180 2 4.60548 180 2
-#define ai_NB_CW_CC_CT 4.60548 180 2 4.60548 180 2
-#define ai_NA_CW_CC_CT 4.60548 180 2 4.60548 180 2
-#define ai_CW_CB_C*_CT 4.60548 180 2 4.60548 180 2
-#define ai_CA_CA_CA_CT 4.60548 180 2 4.60548 180 2
-#define ai_C__CM_CM_CT 4.60548 180 2 4.60548 180 2 ; dac guess, 9/94
-#define ai_NC_CM_CA_N2 4.60548 180 2 4.60548 180 2 ; dac guess, 9/94
-#define ai_CB_NC_CA_N2 4.60548 180 2 4.60548 180 2 ; dac, 10/94
-#define ai_NA_NC_CA_N2 4.60548 180 2 4.60548 180 2 ; dac, 10/94
-#define ai_CA_CA_C__OH 4.60548 180 2 4.60548 180 2
-
-; Found:
-; # bonds: 83
-; # angles: 191
-; # propers: 83
-; # impropers: 31
+++ /dev/null
-; Amber forcefield converted to Gromacs
-; from file /usr/slocal/amber6/dat/parm98.dat
-;
-; PARM94 for DNA, RNA and proteins with TIP3P Water. USE SCEE=1.2 in energy progs
-;
-
-; H-bond params not implemented
-; NOTE: all H-bond (10-12) parameters are Zero
-
-; LJ 6-12 equivalent atom symbols
-; N NA N2 N* NC NB N3 NP NO (9)
-; C C* CA CB CC CN CM CK CQ CW CV CR CA CX CY CD (16)
-
-; Define LJ 6-12 parameter types:
-#define alj_H 0.06 0.0657328
-#define alj_HO 0 0
-#define alj_HS 0.06 0.0657328
-#define alj_HC 0.1487 0.0657328
-#define alj_H1 0.1387 0.0657328
-#define alj_H2 0.1287 0.0657328
-#define alj_H3 0.1187 0.0657328
-#define alj_HP 0.11 0.0657328
-#define alj_HA 0.1459 0.062802
-#define alj_H4 0.1409 0.062802
-#define alj_H5 0.1359 0.062802
-#define alj_HW 0 0
-#define alj_O 0.16612 0.879228
-#define alj_O2 0.16612 0.879228
-#define alj_OW 0.17683 0.636394
-#define alj_OH 0.1721 0.880903
-#define alj_OS 0.16837 0.711756
-#define alj_CT 0.1908 0.458036
-#define alj_CA 0.1908 0.360065
-#define alj_CM 0.1908 0.360065
-#define alj_C 0.1908 0.360065
-#define alj_N 0.1824 0.711756
-#define alj_S 0.2 1.0467
-#define alj_SH 0.2 1.0467
-#define alj_P 0.21 0.83736
-#define alj_IM 0.247 0.41868
-#define alj_Li 0.1137 0.0766184
-#define alj_IP 0.1868 0.0115974
-#define alj_K 0.2658 0.00137327
-#define alj_Rb 0.2956 0.000711756
-#define alj_Cs 0.3395 0.000337456
-#define alj_I 0.235 1.67472
-#define alj_F 0.175 0.255395
-#define alj_IB 0.5 0.41868
-
-[ atomtypes ]
-;name mass q tp sigma/epsilon
- BR 79.9 0 A alj_BR ; bromine
- C 12.01 0 A alj_C ; sp2 C carbonyl group
- CA 12.01 0 A alj_C ; sp2 C pure aromatic (benzene)
- CB 12.01 0 A alj_C ; sp2 aromatic C, 5&6 membered ring junction
- CC 12.01 0 A alj_C ; sp2 aromatic C, 5 memb. ring HIS
- CK 12.01 0 A alj_C ; sp2 C 5 memb.ring in purines
- CM 12.01 0 A alj_C ; sp2 C pyrimidines in pos. 5 & 6
- CN 12.01 0 A alj_C ; sp2 C aromatic 5&6 memb.ring junct.(TRP)
- CQ 12.01 0 A alj_C ; sp2 C in 5 mem.ring of purines between 2 N
- CR 12.01 0 A alj_C ; sp2 arom as CQ but in HIS
- CT 12.01 0 A alj_CT ; sp3 aliphatic C
- CV 12.01 0 A alj_C ; sp2 arom. 5 memb.ring w/1 N and 1 H (HIS)
- CW 12.01 0 A alj_C ; sp2 arom. 5 memb.ring w/1 N-H and 1 H (HIS)
- C* 12.01 0 A alj_C ; sp2 arom. 5 memb.ring w/1 subst. (TRP)
- C0 40.08 0 A alj_C0 ; calcium
- F 19 0 A alj_F ; fluorine
- H 1.008 0 A alj_H ; H bonded to nitrogen atoms
- HC 1.008 0 A alj_HC ; H aliph. bond. to C without electrwd.group
- H1 1.008 0 A alj_H1 ; H aliph. bond. to C with 1 electrwd. group
- H2 1.008 0 A alj_H2 ; H aliph. bond. to C with 2 electrwd.groups
- H3 1.008 0 A alj_H3 ; H aliph. bond. to C with 3 eletrwd.groups
- HA 1.008 0 A alj_HA ; H arom. bond. to C without elctrwd. groups
- H4 1.008 0 A alj_H4 ; H arom. bond. to C with 1 electrwd. group
- H5 1.008 0 A alj_H5 ; H arom. bond. to C with 2 electrwd. groups
- HO 1.008 0 A alj_HO ; hydroxyl group
- HS 1.008 0 A alj_HS ; hydrogen bonded to sulphur
- HW 1.008 0 A alj_HW ; H in TIP3P water
- HP 1.008 0 A alj_HP ; H bonded to C next to positively charged gr
- I 126.9 0 A alj_I ; iodine
- IM 35.45 0 A alj_IM ; assumed to be Cl-
- IP 22.99 0 A alj_IP ; assumed to be Na+
- IB 131 0 A alj_IB ; 'big ion w/ waters' for vacuum (Na+, 6H2O)
- MG 24.305 0 A alj_MG ; magnesium
- N 14.01 0 A alj_N ; sp2 nitrogen in amide groups
- NA 14.01 0 A alj_N ; sp2 N in 5 memb.ring w/H atom (HIS)
- NB 14.01 0 A alj_N ; sp2 N in 5 memb.ring w/LP (HIS,ADE,GUA)
- NC 14.01 0 A alj_N ; sp2 N in 6 memb.ring w/LP (ADE,GUA)
- N2 14.01 0 A alj_N ; sp2 N in amino groups
- N3 14.01 0 A alj_N ; sp3 N for charged amino groups (Lys, etc)
- N* 14.01 0 A alj_N ; sp2 N
- O 16 0 A alj_O ; carbonyl group oxygen
- OW 16 0 A alj_OW ; oxygen in TIP3P water
- OH 16 0 A alj_OH ; oxygen in hydroxyl group
- OS 16 0 A alj_OS ; ether and ester oxygen
- O2 16 0 A alj_O2 ; carboxyl and phosphate group oxygen
- P 30.97 0 A alj_P ; phosphate
- S 32.06 0 A alj_S ; sulphur in disulfide linkage
- SH 32.06 0 A alj_SH ; sulphur in cystine
- CU 63.55 0 A alj_CU ; copper
- FE 55 0 A alj_FE ; iron
- Li 6.94 0 A alj_Li ; lithium
- K 39.1 0 A alj_K ; potassium
- Rb 85.47 0 A alj_Rb ; rubidium
- Cs 132.91 0 A alj_Cs ; cesium
-
-; Found:
-; # atoms: 54
-; # H-bonds (10-12): 1
-; # equivalent 6-12: 2
-; # LJ (6-12): 34
+++ /dev/null
-#!/bin/csh -f
-
-# first: put each residue on one line; newlines are replaced by '@'
-# then: sort lines
-# finally: replace '@' again by newline (and eliminate empty lines)
-awk '\
-NF==2 {printf "\n"; printf $0"@";} \
-NF>2 {printf $0"@"}\
-' $1 | sort | awk '\
-{gsub("@","\n"); print;}\
-' | awk 'NF'
-
-#last line
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.3.99_development_20071104
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2006, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * Groningen Machine for Chemical Simulation
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <math.h>
-#include "typedefs.h"
-#include "gromacs/commandline/pargs.h"
-#include "copyrite.h"
-#include "gromacs/utility/fatalerror.h"
-#include "gromacs/fileio/xvgr.h"
-#include "viewit.h"
-#include "gromacs/fileio/pdbio.h"
-#include "macros.h"
-#include "gromacs/utility/smalloc.h"
-#include "gromacs/math/vec.h"
-#include "gromacs/math/units.h"
-#include "names.h"
-#include "txtdump.h"
-#include "gromacs/fileio/confio.h"
-
-real pot(real x,real qq,real c6,real c12)
-{
- return c12*pow(x,-12)-c6*pow(x,-6)+qq*ONE_4PI_EPS0/x;
-}
-
-real dpot(real x,real qq,real c6,real c12)
-{
- return -(12*c12*pow(x,-13)-6*c6*pow(x,-7)+qq*ONE_4PI_EPS0/sqr(x));
-}
-
-int main(int argc,char *argv[])
-{
- static char *desc[] = {
- "Plot the potential"
- };
- static real c6=1.0e-3,c12=1.0e-6,qi=1,qj=2,sig=0.3,eps=1,sigfac=0.7;
- t_pargs pa[] = {
- { "-c6", FALSE, etREAL, {&c6}, "c6" },
- { "-c12", FALSE, etREAL, {&c12}, "c12" },
- { "-sig", FALSE, etREAL, {&sig}, "sig" },
- { "-eps", FALSE, etREAL, {&eps}, "eps" },
- { "-qi", FALSE, etREAL, {&qi}, "qi" },
- { "-qj", FALSE, etREAL, {&qj}, "qj" },
- { "-sigfac", FALSE, etREAL, {&sigfac}, "Factor in front of sigma for starting the plot" }
- };
- t_filenm fnm[] = {
- { efXVG, "-o", "potje", ffWRITE }
- };
-#define NFILE asize(fnm)
-
- FILE *fp;
- int i;
- real qq,x,oldx,minimum,mval,dp[2],pp[2];
- int cur=0;
-#define next (1-cur)
-
- /* CopyRight(stdout,argv[0]);*/
- parse_common_args(&argc,argv,PCA_CAN_VIEW,
- NFILE,fnm,asize(pa),pa,asize(desc),
- desc,0,NULL);
-
- if (opt2parg_bSet("-sig",asize(pa),pa) ||
- opt2parg_bSet("-eps",asize(pa),pa)) {
- c6 = 4*eps*pow(sig,6);
- c12 = 4*eps*pow(sig,12);
- }
- else if ((c6 != 0) && (c12 != 0)) {
- sig = pow(c12/c6,1.0/6.0);
- eps = c6*c6/(4*c12);
- }
- else {
- sig = eps = 0;
- }
- printf("c6 = %12.5e, c12 = %12.5e\n",c6,c12);
- printf("sigma = %12.5f, epsilon = %12.5f\n",sig,eps);
- qq = qi*qj;
-
- fp = xvgropen(ftp2fn(efXVG,NFILE,fnm),"Potential","r (nm)","E (kJ/mol)");
- if (sig == 0)
- sig=0.25;
- minimum = -1;
- mval = 0;
- oldx = 0;
- for(i=0; (i<100); i++) {
- x = sigfac*sig+sig*i*0.02;
- dp[next] = dpot(x,qq,c6,c12);
- fprintf(fp,"%10g %10g %10g\n",x,pot(x,qq,c6,c12),
- dp[next]);
- if ((i > 0) && (dp[cur]*dp[next] < 0)) {
- minimum = oldx + dp[cur]*(x-oldx)/(dp[cur]-dp[next]);
- mval = pot(minimum,qq,c6,c12);
- /*fprintf(stdout,"dp[cur] = %g, dp[next] = %g oldx = %g, dx = %g\n",
- dp[cur],dp[next],oldx,x-oldx);*/
- printf("Minimum at r = %g (nm). Value = %g (kJ/mol)\n",
- minimum,mval);
- }
- cur = next;
- oldx = x;
-
- }
- gmx_ffclose(fp);
-
- do_view(ftp2fn(efXVG,NFILE,fnm),NULL);
-
- gmx_thanx(stderr);
-
- return 0;
-}
-
-
+++ /dev/null
-#include "gromacs/utility/fatalerror.h"
-
-void my_func(char *msg)
-{
- fprintf(stderr,"Welcome to my_func\n%s\n",msg);
- exit(1);
-}
-
-int main(int argc,char *argv[])
-{
- int n = -3;
- int choice;
- char *end;
-
- /* set_gmx_error_handler(my_func);*/
-
- if (argc <= 1)
- gmx_fatal(FARGS,"Expected an integer argument to %s",argv[0]);
- choice = strtol(argv[1], &end, 10);
- if (end!='\0')
- gmx_fatal(FARGS,"Expected an integer argument to %s",argv[0]);
-
-
- switch (choice) {
- case 1:
- gmx_error("pme","oooo");
- break;
- case 2:
- gmx_fatal(FARGS,"Passing string %s to you %f %d %x","lll",8.3,34,34);
- break;
- case 3:
- range_check(n,1,5);
- break;
- default:
- range_check(choice,1,3);
- }
- return 0;
-}
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * GROningen Mixture of Alchemy and Childrens' Stories
- */
-#include <math.h>
-#include <stdio.h>
-#include "typedefs.h"
-#include "macros.h"
-#include "gromacs/utility/smalloc.h"
-#include "gromacs/fileio/xvgr.h"
-#include "complex.h"
-#include "fftgrid.h"
-#include "mdrun.h"
-
-void testfft(FILE *fp,t_complex ***grid,int nx,int ny,int nz,gmx_bool bFirst)
-{
-#ifdef USE_SGI_FFT
-#if GMX_DOUBLE
- static zomplex *coeff;
-#else
- static complex *coeff;
-#endif
- static int la1,la2;
-#endif
- t_complex *cptr;
- real *gptr,*fqqq,fg,fac;
- int ntot,i,j,k,m,n,ndim[4];
- int npppm;
-
- ndim[0] = 0;
- ndim[1] = nx;
- ndim[2] = ny;
- ndim[3] = nz;
-
- ntot = nx*ny*nz;
- cptr = grid[0][0];
- fqqq = &(grid[0][0][0].re);
-
-#ifdef USE_SGI_FFT
- if (bFirst) {
- fprintf(fp,"Going to use SGI optimized FFT routines.\n");
-#if GMX_DOUBLE
- coeff = zfft3di(nx,ny,nz,NULL);
-#else
- coeff = cfft3di(nx,ny,nz,NULL);
-#endif
- bFirst = FALSE;
- }
- la1 = nx;
- la2 = ny;
-#if GMX_DOUBLE
- zfft3d(1,nx,ny,nz,(zomplex *)cptr,la1,la2,coeff);
-#else
- cfft3d(1,nx,ny,nz,(complex *)cptr,la1,la2,coeff);
-#endif
-#else
- fourn(fqqq-1,ndim,3,1);
-#endif
-
-#ifdef USE_SGI_FFT
-#if GMX_DOUBLE
- zfft3d(-1,nx,ny,nz,(zomplex *)cptr,la1,la2,coeff);
-#else
- cfft3d(-1,nx,ny,nz,(complex *)cptr,la1,la2,coeff);
-#endif
-#else
- fourn(fqqq-1,ndim,3,-1);
-#endif
-}
-
-void testrft(FILE *fp,real ***grid,int nx,int ny,int nz,gmx_bool bFirst)
-{
-#ifdef USE_SGI_FFT
-#if GMX_DOUBLE
- static double *coeff;
-#else
- static float *coeff;
-#endif
- static int la1,la2;
-#endif
- real *cptr;
- real *gptr,*fqqq,fg,fac;
- int ntot,i,j,k,m,n,ndim[4];
- int npppm,job;
-
- ndim[0] = 0;
- ndim[1] = nx;
- ndim[2] = ny;
- ndim[3] = nz;
-
- ntot = nx*ny*nz;
- cptr = grid[0][0];
- fqqq = &(grid[0][0][0]);
-
-#ifdef USE_SGI_FFT
- if (bFirst) {
- fprintf(fp,"Going to use SGI optimized FFT routines.\n");
-#if GMX_DOUBLE
- coeff = dfft3di(nx,ny,nz,NULL);
-#else
- coeff = sfft3di(nx,ny,nz,NULL);
-#endif
- bFirst = FALSE;
- }
- job = 1;
- la1 = nx+2;
- la2 = ny;
-#if GMX_DOUBLE
- dzfft3d(job,nx,ny,nz,cptr,la1,la2,coeff);
-#else
- scfft3d(job,nx,ny,nz,cptr,la1,la2,coeff);
-#endif
-#else
- fourn(fqqq-1,ndim,3,1);
-#endif
-
- job = -1;
-
-#ifdef USE_SGI_FFT
-#if GMX_DOUBLE
- zdfft3d(job,nx,ny,nz,cptr,la1,la2,coeff);
-#else
- csfft3d(job,nx,ny,nz,cptr,la1,la2,coeff);
-#endif
-#else
- fourn(fqqq-1,ndim,3,-1);
-#endif
-}
-
-int main(int argc,char *argv[])
-{
- FILE *fp;
- int nnn[] = { 8, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30, 32, 36, 40,
- 45, 48, 50, 54, 60, 64, 72, 75, 80, 81, 90, 100 };
-#define NNN asize(nnn)
- int *niter;
- int i,j,n,nit,ntot,n3;
- double t,nflop;
- double *rt,*ct;
- t_complex ***g;
- real ***h;
-
- snew(rt,NNN);
- snew(ct,NNN);
- snew(niter,NNN);
-
- for(i=0; (i<NNN); i++) {
- n = nnn[i];
- fprintf(stderr,"\rReal %d ",n);
- if (n < 16)
- niter[i] = 100;
- else if (n < 26)
- niter[i] = 50;
- else if (n < 51)
- niter[i] = 10;
- else
- niter[i] = 5;
- nit = niter[i];
-
- h = mk_rgrid(n+2,n,n);
- start_time();
- for(j=0; (j<nit); j++) {
- testrft(stdout,h,n,n,n,(j==0));
- }
- update_time();
- rt[i] = node_time();
- free_rgrid(h,n,n);
-
- fprintf(stderr,"\rComplex %d ",n);
- g = mk_cgrid(n,n,n);
- start_time();
- for(j=0; (j<nit); j++) {
- testfft(stdout,g,n,n,n,(j==0));
- }
- update_time();
- ct[i] = node_time();
- free_cgrid(g,n,n);
- }
- fprintf(stderr,"\n");
- fp=xvgropen("timing.xvg","FFT timings per grid point","n","t (s)");
- for(i=0; (i<NNN); i++) {
- n3 = 2*niter[i]*nnn[i]*nnn[i]*nnn[i];
- fprintf(fp,"%10d %10g %10g\n",nnn[i],rt[i]/n3,ct[i]/n3);
- }
- gmx_fio_fclose(fp);
-
- return 0;
-}
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * GROningen Mixture of Alchemy and Childrens' Stories
- */
-#include <math.h>
-#include <string.h>
-#include "typedefs.h"
-#include "gromacs/math/vec.h"
-#include "gromacs/math/units.h"
-#include "macros.h"
-#include "names.h"
-#include "gromacs/utility/smalloc.h"
-#include "gromacs/fileio/tpxio.h"
-#include "gromacs/commandline/pargs.h"
-#include "gromacs/fileio/writeps.h"
-#include "copyrite.h"
-#include "pppm.h"
-#include "readinp.h"
-#include "force.h"
-#include "nrnb.h"
-#include "coulomb.h"
-#include "gromacs/pbcutil/mshift.h"
-#include "poisson.h"
-#include "mdatoms.h"
-
-static real phi_sr(FILE *log,int nj,rvec x[],real charge[],real rc,real r1,
- rvec box, real phi[],t_block *excl,rvec f_sr[],gmx_bool bOld)
-{
- int i,j,k,m,ni,i1,i2;
- real pp,r2,R,R_1,R_2,rc2;
- real qi,qj,vsr,eps,fscal;
- rvec dx;
-
- vsr = 0.0;
- eps = ONE_4PI_EPS0;
- rc2 = rc*rc;
- ni=0;
- for(i=0; (i<nj-1); i++) {
- qi=charge[i];
- for(j=i+1; (j<nj); j++) {
- i1=excl->index[i];
- i2=excl->index[i+1];
- for(k=i1; (k<i2); k++)
- if (excl->a[k] == j)
- break;
- if (k == i2) {
- r2=calc_dx2dx(x[i],x[j],box,dx);
- if (r2 < rc2) {
- qj = charge[j];
- R_1 = invsqrt(r2);
- R_2 = R_1*R_1;
- R = invsqrt(R_2);
- if (bOld) {
- fscal = old_f(R,rc,r1)*R_2;
- pp = old_phi(R,rc,r1);
- }
- else {
- fscal = new_f(R,rc)*R_2;
- pp = new_phi(R,rc);
- }
- phi[i] += eps*qj*pp;
- phi[j] += eps*qi*pp;
- vsr += eps*qj*qi*pp;
- for(m=0; (m<DIM); m++) {
- f_sr[i][m] += dx[m]*fscal;
- f_sr[j][m] -= dx[m]*fscal;
- }
- ni++;
- }
- }
- }
- }
- fprintf(log,"There were %d short range interactions, vsr=%g\n",ni,vsr);
-
- return vsr;
-}
-
-void calc_ener(FILE *fp,char *title,gmx_bool bHeader,int nmol,
- int natoms,real phi[],real charge[],t_block *excl)
-{
- int i,i1,i2,j,k;
- real qq,qi,vv,V,Vex,Vc,Vt;
-
- qq = 0;
- V = 0;
- for(i=0; (i<natoms); i++) {
- vv = charge[i]*phi[i];
- V += vv;
- qq += charge[i]*charge[i];
- }
- V = 0.5*V;
- Vc = 0.5*C*ONE_4PI_EPS0*qq;
-
- qq = 0;
- for(i=0; (i<excl->nr); i++) {
- i1 = excl->index[i];
- i2 = excl->index[i+1];
- qi = charge[i];
- for(j=i1; (j<i2); j++) {
- k = excl->a[j];
- if (k != i)
- qq+=qi*charge[k];
- }
- }
- Vex = qq*0.5*C*ONE_4PI_EPS0;
-
- Vt = V - Vc - Vex;
-
- if (bHeader) {
- fprintf(fp,"%12s %12s %12s %12s %12s %12s\n",
- "","Vphi","Vself","Vexcl","Vtot","1Mol");
-
- }
- fprintf(fp,"%12s %12.5e %12.5e %12.5e %12.5e %12.5e\n",
- title,V,Vc,Vex,Vt,Vt/nmol);
-}
-
-void write_pqr(char *fn,t_atoms *atoms,rvec x[],real phi[],real dx)
-{
- FILE *fp;
- int i,rnr;
-
- fp=gmx_fio_fopen(fn,"w");
- for(i=0; (i<atoms->nr); i++) {
- rnr=atoms->atom[i].resnr;
- fprintf(fp,"%-6s%5d %-4.4s%3.3s %c%4d %8.3f%8.3f%8.3f%6.2f%6.2f\n",
- "ATOM",(i+1),*atoms->atomname[i],*atoms->resname[rnr],' ',
- (rnr+1) % 10000,
- 10*(dx+x[i][XX]),10*x[i][YY],10*(x[i][ZZ]),0.0,phi[i]);
- }
- gmx_fio_fclose(fp);
-}
-
-void write_grid_pqr(char *fn,int nx,int ny,int nz,real ***phi)
-{
- FILE *fp;
- int i,j,k,rnr=0;
- real fac=4.0;
-
- fp=gmx_fio_fopen(fn,"w");
- for(i=0; (i<nx); i++)
- for(j=0; (j<ny); j++)
- for(k=0; (k<nz); k++,rnr++)
- fprintf(fp,"%-6s%5d %-4.4s%3.3s %c%4d %8.3f%8.3f%8.3f%6.2f%6.2f\n",
- "ATOM",(i+1),"C","C",' ',
- 1+((rnr+1) % 10000),fac*i,fac*j,fac*k,0.0,phi[i][j][k]);
- gmx_fio_fclose(fp);
-}
-void plot_phi(char *fn,rvec box,int natoms,rvec x[],real phi[])
-{
- t_psdata eps;
- real phi_max,rr,gg,bb,fac,dx,x0,y0;
- real offset;
- int i;
-
- phi_max=phi[0];
- rr=gg=bb=0.0;
- for(i=0; (i<natoms); i++)
- phi_max=max(phi_max,fabs(phi[i]));
-
- if (phi_max==0.0) {
- fprintf(stderr,"All values zero, see .out file\n");
- return;
- }
- offset=20.0;
- fac=15.0;
-#ifdef DEBUG
- fprintf(stderr,"Scaling box by %g\n",fac);
-#endif
- eps=ps_open(fn,0,0,
- (real)(fac*box[XX]+2*offset),(real)(fac*box[YY]+2*offset));
- ps_translate(eps,offset,offset);
- ps_color(eps,0,0,0);
- ps_box(eps,1,1,(real)(fac*box[XX]-1),(real)(fac*box[YY]-1));
- dx=0.15*fac;
- for(i=0; (i<natoms); i++) {
- rr=gg=bb=1.0;
- if (phi[i] < 0)
- gg=bb=(1.0+(phi[i]/phi_max));
- else
- rr=gg=(1.0-(phi[i]/phi_max));
- rr=rgbset(rr);
- gg=rgbset(gg);
- bb=rgbset(bb);
- ps_color(eps,rr,gg,bb);
- x0=fac*x[i][XX];
- y0=fac*x[i][YY];
- ps_fillbox(eps,(real)(x0-dx),(real)(y0-dx),(real)(x0+dx),(real)(y0+dx));
- }
- ps_close(eps);
-}
-
-void plot_qtab(char *fn,int nx,int ny,int nz,real ***qtab)
-{
- rvec box;
- rvec *xx;
- real *phi;
- int i,npt,ix,iy,iz;
-
- box[XX]=nx;
- box[YY]=ny;
- box[ZZ]=nz;
-
- npt=(box[XX]*box[YY]*box[ZZ]);
- snew(xx,npt);
- snew(phi,npt);
- nx/=2;
- ny/=2;
- nz/=2;
- i=0;
- for(ix=-nx; (ix<nx); ix++)
- for(iy=-ny; (iy<ny); iy++)
- for(iz=-nz; (iz<nz); iz++,i++) {
- xx[i][XX]=ix+nx+0.5;
- xx[i][YY]=iy+ny+0.5;
- xx[i][ZZ]=iz+nz+0.5; /* onzin */
- phi[i]=qtab[ix+nx][iy+ny][iz+nz];
- }
-
- plot_phi(fn,box,npt,xx,phi);
-
- sfree(xx);
- sfree(phi);
-}
-
-void print_phi(char *fn,int natoms,rvec x[],real phi[])
-{
- FILE *fp;
- int i;
-
- fp=gmx_fio_fopen(fn,"w");
- for(i=0; (i<natoms); i++)
- fprintf(fp,"%10d %12.5e\n",i,phi[i]);
- gmx_fio_fclose(fp);
-}
-
-void pr_f(char *fn,int natoms,rvec f[])
-{
- FILE *fp;
- int i;
-
- fp=gmx_fio_fopen(fn,"w");
- for(i=0; (i<natoms); i++)
- fprintf(fp," %12.5e\n %12.5e\n %12.5e\n",f[i][XX],f[i][YY],f[i][ZZ]);
- gmx_fio_fclose(fp);
-}
-
-void test_pppm(FILE *log, gmx_bool bVerbose,
- gmx_bool bGenerGhat, char *ghatfn,
- t_atoms *atoms, t_inputrec *ir,
- rvec x[], rvec f[],
- real charge[], rvec box,
- real phi[], real phi_s[],
- int nmol, t_commrec *cr,
- gmx_bool bOld, t_block *cgs)
-{
- char buf[256];
- real ener;
- int i;
- t_nrnb nrnb;
- t_nsborder nsb;
-
- init_nrnb(&nrnb);
- calc_nsb(cgs,1,&nsb,0);
-
- /* First time only setup is done! */
- init_pppm(log,cr,&nsb,bVerbose,bOld,box,ghatfn,ir);
-
- ener = do_pppm(log,bVerbose,x,f,charge,box,phi,cr,&nsb,&nrnb);
- fprintf(log,"Vpppm = %g\n",ener);
-
- sprintf(buf,"PPPM-%d.pdb",ir->nkx);
- write_pqr(buf,atoms,x,phi,0);
-
- pr_f("pppm-force",atoms->nr,f);
-
- calc_ener(log,buf,FALSE,nmol,atoms->nr,phi,charge,&atoms->excl);
-
- for(i=0; (i<atoms->nr); i++)
- phi[i]+=phi_s[i];
- sprintf(buf,"PPPM-%d+SR",ir->nkx);
- calc_ener(log,buf,FALSE,nmol,atoms->nr,phi,charge,&atoms->excl);
- strcat(buf,".pdb");
- write_pqr(buf,atoms,x,phi,0);
-}
-
-void test_poisson(FILE *log, gmx_bool bVerbose,
- t_atoms *atoms, t_inputrec *ir,
- rvec x[], rvec f[],
- real charge[], rvec box,
- real phi[], real phi_s[],
- int nmol, t_commrec *cr,
- gmx_bool bFour, rvec f_four[],
- real phi_f[], gmx_bool bOld)
-{
- char buf[256];
- real ener;
- rvec beta;
- int i,nit;
- t_nrnb nrnb;
-
- init_nrnb(&nrnb);
-
- /* First time only setup is done! */
- if (bFour) {
- for(i=0; (i<atoms->nr); i++)
- phi_f[i] -= phi_s[i];
- ener = do_optimize_poisson(log,bVerbose,ir,atoms->nr,x,f,charge,
- box,phi,cr,&nrnb,f_four,phi_f,beta,bOld);
- for(i=0; (i<atoms->nr); i++)
- phi_f[i] += phi_s[i];
- nit = 0;
- }
- else {
- ener = do_poisson(log,bVerbose,ir,atoms->nr,x,f,charge,box,phi,
- cr,&nrnb,&nit,bOld);
- }
-
- fprintf(log,"Vpoisson = %g, nit = %d\n",ener,nit);
-
- sprintf(buf,"POISSON-%d.pdb",ir->nkx);
- write_pqr(buf,atoms,x,phi,0);
-
- pr_f("poisson-force",atoms->nr,f);
-
- calc_ener(log,buf,FALSE,nmol,atoms->nr,phi,charge,&atoms->excl);
-
- for(i=0; (i<atoms->nr); i++)
- phi[i]+=phi_s[i];
- sprintf(buf,"POISSON-%d+SR",ir->nkx);
- calc_ener(log,buf,FALSE,nmol,atoms->nr,phi,charge,&atoms->excl);
- strcat(buf,".pdb");
- write_pqr(buf,atoms,x,phi,0);
-}
-
-void test_four(FILE *log,int NFILE,t_filenm fnm[],t_atoms *atoms,
- t_inputrec *ir,rvec x[],rvec f[],rvec box,real charge[],
- real phi_f[],real phi_s[],int nmol,t_commrec *cr,
- gmx_bool bOld,gmx_bool bOldEwald)
-{
- int i;
- real energy;
- ewald_tab_t et;
-
- init_ewald_tab(&et, NULL, ir, log);
-
- if (bOldEwald)
- energy = do_ewald(log,ir,atoms->nr,x,f,charge,box,phi_f,cr,bOld,et);
- else
- energy = do_ewald_new(log,ir,atoms->nr,x,f,charge,box,phi_f,cr,bOld,et);
-
- /*symmetrize_phi(log,atoms->nr,phi_f,bVerbose);*/
-
- /* Plot the long range fourier solution in a matrix */
- plot_phi(opt2fn("-elf",NFILE,fnm),box,atoms->nr,x,phi_f);
- print_phi(opt2fn("-of",NFILE,fnm),atoms->nr,x,phi_f);
- calc_ener(log,"Fourier",FALSE,nmol,atoms->nr,phi_f,charge,&atoms->excl);
- write_pqr(opt2fn("-pf",NFILE,fnm),atoms,x,phi_f,0.0/*1.5*box[XX]*/);
- pr_f("four-force",atoms->nr,f);
-
- /* Calc and plot the total potential */
- for(i=0; (i<atoms->nr); i++) {
- phi_f[i]+=phi_s[i];
- /*clear_rvec(f[i]);*/
- }
- calc_ener(log,"Fourier+SR",FALSE,nmol,atoms->nr,phi_f,charge,&atoms->excl);
-}
-
-static void print_opts(FILE *fp,t_inputrec *ir,gmx_bool bFour)
-{
- fprintf(fp,"Ewald solution: %s\n",gmx_bool_names[bFour]);
- fprintf(fp,"r1: %10.3e\n",ir->rcoulomb_switch);
- fprintf(fp,"rc: %10.3e\n",ir->rcoulomb);
- if (bFour)
- fprintf(fp,"KVectors: %10d %10d %10d\n",ir->nkx,ir->nky,ir->nkz);
- fprintf(fp,"\n");
-}
-
-int main(int argc,char *argv[])
-{
- static char *desc[] = {
- "[TT]testlr[tt] tests the PPPM and Ewald method for the",
- "long range electrostatics problem."
- };
- static t_filenm fnm[] = {
- { efTPX, NULL, NULL, ffREAD },
- { efHAT, "-g", "ghat", ffOPTRD },
- { efOUT, "-o", "rho", ffOPTWR },
- { efOUT, "-op", "lr-pb", ffOPTWR },
- { efOUT, "-of", "lr-four", ffOPTWR },
- { efOUT, "-opt", "tot-pb", ffOPTWR },
- { efOUT, "-oft", "tot-four", ffOPTWR },
- { efOUT, "-fin", "lr-four", ffOPTWR },
- { efEPS, "-es", "sr", ffOPTWR },
- { efEPS, "-elf", "lr-four", ffOPTWR },
- { efEPS, "-etf", "tot-four", ffOPTWR },
- { efEPS, "-qr", "qk-real", ffOPTWR },
- { efEPS, "-qi", "qk-im", ffOPTWR },
- { efEPS, "-elp", "lr-pb", ffOPTWR },
- { efEPS, "-etp", "tot-pb", ffOPTWR },
- { efEPS, "-rho", "rho", ffOPTWR },
- { efEPS, "-qq", "charge", ffOPTWR },
- { efXVG, "-gt", "gk-tab", ffOPTWR },
- { efXVG, "-fcorr","fcorr", ffWRITE },
- { efXVG, "-pcorr","pcorr", ffWRITE },
- { efXVG, "-ftotcorr","ftotcorr", ffWRITE },
- { efXVG, "-ptotcorr","ptotcorr", ffWRITE },
- { efLOG, "-l", "fptest", ffWRITE },
- { efXVG, "-gr", "spread", ffOPTWR },
- { efPDB, "-pf", "pqr-four", ffOPTWR },
- { efPDB, "-phitot", "pppm-phitot", ffOPTWR }
- };
-#define NFILE asize(fnm)
- FILE *log;
- t_topology top;
- t_tpxheader stath;
- t_inputrec ir;
- t_block *excl;
- t_forcerec *fr;
- t_commrec *cr;
- t_mdatoms *mdatoms;
- t_graph *graph;
- int i,step,nre,natoms,nmol;
- rvec *x,*f_sr,*f_excl,*f_four,*f_pppm,*f_pois,box_size,hbox;
- matrix box;
- real t,lambda,vsr,*charge,*phi_f,*phi_pois,*phi_s,*phi_p3m,*rho;
- output_env_t oenv;
-
- static gmx_bool bFour=FALSE,bVerbose=FALSE,bGGhat=FALSE,bPPPM=TRUE,
- bPoisson=FALSE,bOld=FALSE,bOldEwald=TRUE;
- static int nprocs = 1;
- static t_pargs pa[] = {
- { "-np", FALSE, etINT, &nprocs, "Do it in parallel" },
- { "-ewald", FALSE, etBOOL, &bFour, "Do an Ewald solution"},
- { "-pppm", FALSE, etBOOL, &bPPPM, "Do a PPPM solution" },
- { "-poisson",FALSE, etBOOL, &bPoisson,"Do a Poisson solution" },
- { "-v", FALSE, etBOOL, &bVerbose,"Verbose on"},
- { "-ghat", FALSE, etBOOL, &bGGhat, "Generate Ghat function"},
- { "-old", FALSE, etBOOL, &bOld, "Use old function types"},
- { "-oldewald",FALSE,etBOOL, &bOldEwald,"Use old Ewald code"}
- };
-
- CopyRight(stderr,argv[0]);
- parse_common_args_r(&argc,argv,PCA_CAN_TIME | PCA_CAN_VIEW,
- NFILE,fnm,asize(pa),pa,asize(desc),desc,0,NULL,&oenv);
-
- if (nprocs > 1) {
- cr = init_par(&argc,argv);
- open_log(ftp2fn(efLOG,NFILE,fnm),cr);
- log = stdlog;
- }
- else {
- cr = init_par(&argc,argv);
- log = ftp2FILE(efLOG,NFILE,fnm,"w");
- stdlog = log; }
-
-
- /* Read topology and coordinates */
- read_tpxheader(ftp2fn(efTPX,NFILE,fnm),&stath,FALSE);
- snew(x,stath.natoms);
- snew(f_sr,stath.natoms);
- snew(f_excl,stath.natoms);
- snew(f_four,stath.natoms);
- snew(f_pppm,stath.natoms);
- snew(f_pois,stath.natoms);
- read_tpx(ftp2fn(efTPX,NFILE,fnm),&step,&t,&lambda,&ir,
- box,&natoms,x,NULL,NULL,&top);
- excl=&(top.atoms.excl);
- nmol=top.blocks[ebMOLS].nr;
-
- /* Allocate space for potential, charges and rho (charge density) */
- snew(charge,stath.natoms);
- snew(phi_f,stath.natoms);
- snew(phi_p3m,stath.natoms);
- snew(phi_pois,stath.natoms);
- snew(phi_s,stath.natoms);
- snew(rho,stath.natoms);
-
- /* Set the charges */
- for(i=0; (i<natoms); i++)
- charge[i]=top.atoms.atom[i].q;
-
- /* Make a simple box vector instead of tensor */
- for(i=0; (i<DIM); i++)
- box_size[i]=box[i][i];
-
- /* Set some constants */
- fr = mk_forcerec();
- mdatoms = atoms2md(&(top.atoms),FALSE,FALSE);
-
- set_LRconsts(log,ir.rcoulomb_switch,ir.rcoulomb,box_size,fr);
- init_forcerec(log,fr,&ir,&(top.blocks[ebMOLS]),cr,
- &(top.blocks[ebCGS]),&(top.idef),mdatoms,box,FALSE);
- calc_shifts(box,box_size,fr->shift_vec,FALSE);
-
- /* Periodicity stuff */
- graph = mk_graph(&(top.idef),top.atoms.nr,FALSE,FALSE);
- shift_self(graph,fr->shift_vec,x);
-
- calc_LRcorrections(log,0,natoms,ir.rcoulomb_switch,
- ir.rcoulomb,charge,excl,x,f_excl,bOld);
- pr_f("f_excl.dat",natoms,f_excl);
-
- /* Compute the short range potential */
- put_atoms_in_box(natoms,box,x);
- vsr=phi_sr(log,natoms,x,charge,ir.rcoulomb,
- ir.rcoulomb_switch,box_size,phi_s,excl,f_sr,bOld);
- pr_f("f_sr.dat",natoms,f_sr);
-
- /* Plot the short range potential in a matrix */
- calc_ener(log,"Short Range",TRUE,nmol,natoms,phi_s,charge,excl);
-
-
- if (bFour)
- test_four(log,NFILE,fnm,&(top.atoms),&ir,x,f_four,box_size,charge,phi_f,
- phi_s,nmol,cr,bOld,bOldEwald);
-
- if (bPPPM)
- test_pppm(log,bVerbose,bGGhat,opt2fn("-g",NFILE,fnm),
- &(top.atoms),&ir,x,f_pppm,charge,box_size,phi_p3m,phi_s,nmol,
- cr,bOld,&(top.blocks[ebCGS]));
-
- if (bPoisson)
- test_poisson(log,bVerbose,
- &(top.atoms),&ir,x,f_pois,charge,box_size,phi_pois,
- phi_s,nmol,cr,bFour,f_four,phi_f,bOld);
-
- if (bPPPM && bFour)
- analyse_diff(log,"PPPM",oenv,
- top.atoms.nr,f_four,f_pppm,phi_f,phi_p3m,phi_s,
- opt2fn("-fcorr",NFILE,fnm),
- opt2fn("-pcorr",NFILE,fnm),
- opt2fn("-ftotcorr",NFILE,fnm),
- opt2fn("-ptotcorr",NFILE,fnm));
-
- if (bPoisson && bFour)
- analyse_diff(log,"Poisson",oenv,
- top.atoms.nr,f_four,f_pois,phi_f,phi_pois,phi_s,
- opt2fn("-fcorr",NFILE,fnm),
- opt2fn("-pcorr",NFILE,fnm),
- opt2fn("-ftotcorr",NFILE,fnm),
- opt2fn("-ptotcorr",NFILE,fnm));
-
- gmx_fio_fclose(log);
-
- gmx_thanx(stderr);
-
- return 0;
-}
-
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * GROningen Mixture of Alchemy and Childrens' Stories
- */
-/* This file is completely threadsafe - keep it that way! */
-
-#include <stdio.h>
-#include "typedefs.h"
-#include "force.h"
-#include "coulomb.h"
-
-int main(int argc,char *argv[])
-{
- t_forcerec *fr;
- rvec box;
-
- fr=mk_forcerec();
- fr->r1 = 0.6;
- fr->rc = 0.9;
- fr->eeltype = eelTWIN;
- box[XX]=box[YY]=box[ZZ]=1.0;
-
- make_tables(fr);
-
- return 0;
-}
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * GROningen Mixture of Alchemy and Childrens' Stories
- */
-#include "macros.h"
-#include "gromacs/utility/smalloc.h"
-#include "xmlio.h"
-#include "gromacs/commandline/pargs.h"
-#include "gromacs/fileio/tpxio.h"
-
-int cmain(int argc,char *argv[])
-{
- int step,natoms;
- real t,lambda;
- t_inputrec ir;
- t_topology top;
- matrix box;
- rvec *x,*v,*f;
- t_filenm fnm[] = {
- { efTPX, NULL, NULL, ffREAD },
- { efXML, "-r", NULL, ffREAD },
- { efXML, "-o", NULL, ffWRITE }
- };
-#define NFILE asize(fnm)
-
- CopyRight(stderr,argv[0]);
- parse_common_args(&argc,argv,0,NFILE,fnm,0,NULL,0,NULL,0,NULL);
-
- init_top(&top);
- if (opt2bSet("-r",NFILE,fnm))
- read_xml(opt2fn("-r",NFILE,fnm),&step,&t,&lambda,&ir,
- box,&natoms,&x,&v,&f,&top);
- else {
- t_tpxheader tpx;
-
- read_tpxheader(ftp2fn(efTPX,NFILE,fnm),&tpx,FALSE);
- snew(x,tpx.natoms);
- snew(v,tpx.natoms);
- f = NULL;
- read_tpx(ftp2fn(efTPX,NFILE,fnm),&step,&t,&lambda,&ir,
- box,&natoms,x,v,f,&top);
- }
- /*write_xml(opt2fn("-o",NFILE,fnm),step,t,lambda,&ir,box,natoms,x,v,f,&top);*/
-
- return 0;
-}
-
-
-
+++ /dev/null
-/*
- *
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- *
- * For more info, check our website at http://www.gromacs.org
- *
- * And Hey:
- * GROwing Monsters And Cloning Shrimps
- */
-#include <math.h>
-#include <stdio.h>
-#include <time.h>
-
-#include "typedefs.h"
-#include "macros.h"
-#include "gromacs/utility/smalloc.h"
-#include "gromacs/fileio/xvgr.h"
-#include "copyrite.h"
-#include "mdrun.h"
-#include "main.h"
-#include "gromacs/commandline/pargs.h"
-#include "gromacs/fft/fft.h"
-#include "gromacs/math/gmxcomplex.h"
-
-#if GMX_MPI
-#include "gromacs/fft/parallel_3dfft.h"
-#endif
-
-#include "fftgrid.h"
-
-
-int main(int argc,char *argv[])
-{
- int mmm[] = { 8, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30, 32, 36, 40,
- 45, 48, 50, 54, 60, 64, 72, 75, 80, 81, 90, 100 };
- int nnn[] = { 24, 32, 48, 60, 72, 84, 96 };
-#define NNN asize(nnn)
- FILE *fp,*fplog;
- int *niter;
- int i,j,n,nit,ntot,n3,rsize;
- double t,nflop,start;
- double *rt,*ct;
- t_fftgrid *g;
- t_commrec *cr;
- static gmx_bool bReproducible = FALSE;
- static int nnode = 1;
- static int nitfac = 1;
- t_pargs pa[] = {
- { "-reproducible", FALSE, etBOOL, {&bReproducible},
- "Request binary reproducible results" },
- { "-np", FALSE, etINT, {&nnode},
- "Number of NODEs" },
- { "-itfac", FALSE, etINT, {&nitfac},
- "Multiply number of iterations by this" }
- };
- static t_filenm fnm[] = {
- { efLOG, "-g", "fft", ffWRITE },
- { efXVG, "-o", "fft", ffWRITE }
- };
-#define NFILE asize(fnm)
-
- cr = init_par(&argc,&argv);
- if (MASTER(cr))
- CopyRight(stdout,argv[0]);
- parse_common_args(&argc,argv, PCA_CAN_SET_DEFFNM,
- NFILE,fnm,asize(pa),pa,0,NULL,0,NULL);
- gmx_log_open(ftp2fn(efLOG,NFILE,fnm),cr,1,0,&fplog);
-
- snew(niter,NNN);
- snew(ct,NNN);
- snew(rt,NNN);
- rsize = sizeof(real);
- for(i=0; (i<NNN); i++) {
- n = nnn[i];
- if (n < 16)
- niter[i] = 50;
- else if (n < 26)
- niter[i] = 20;
- else if (n < 51)
- niter[i] = 10;
- else
- niter[i] = 5;
- niter[i] *= nitfac;
- nit = niter[i];
-
- if (MASTER(cr))
- fprintf(stderr,"\r3D FFT (%s precision) %3d^3, niter %3d ",
- (rsize == 8) ? "Double" : "Single",n,nit);
-
- g = mk_fftgrid(n,n,n,NULL,NULL,cr,bReproducible);
-
- if (PAR(cr))
- start = time(NULL);
- else
- start_time();
- for(j=0; (j<nit); j++) {
- gmxfft3D(g,GMX_FFT_REAL_TO_COMPLEX,cr);
- gmxfft3D(g,GMX_FFT_COMPLEX_TO_REAL,cr);
- }
- if (PAR(cr))
- rt[i] = time(NULL)-start;
- else {
- update_time();
- rt[i] = node_time();
- }
- done_fftgrid(g);
- sfree(g);
- }
- if (MASTER(cr)) {
- fprintf(stderr,"\n");
- fp=xvgropen(ftp2fn(efXVG,NFILE,fnm),
- "FFT timings","n^3","t (s)");
- for(i=0; (i<NNN); i++) {
- n3 = 2*niter[i]*nnn[i]*nnn[i]*nnn[i];
- fprintf(fp,"%10d %10g\n",nnn[i],rt[i]/(2*niter[i]));
- }
- gmx_fio_fclose(fp);
- }
- return 0;
-}
+++ /dev/null
-C Chemical shift calculation, to read in multiple NMR structures
-C (with protons) and calculate sd for each
-C Will also read Xray structures and add protons
-C Current limit is 5000 heavy atoms 3000 protons and 50 rings
-C Author - Mike Williamson Jan 94
-C see M P Williamson and T Asakura, J Magn Reson Ser B 101 63-71 1993
- DIMENSION SHIFT(3000) !Shift values for each proton
- DIMENSION ANISCO(3000),ANISCN(3000),SHIFTE(3000)
- DIMENSION sum(3000),exptln(3000)
- DIMENSION EXPTL(3000) !Exptl shifts (external file)
- DIMENSION IRES(5000),RES(5000),ANAME(5000),FINAL(3000)
- DIMENSION X(5000), Y(5000), Z(5000) !Heavy atom input
- DIMENSION IRESH(3000),RESH(3000),ANAMEH(3000)
- DIMENSION XH(3000), YH(3000), ZH(3000) !H atom input
- DIMENSION vx(3),vy(3),vz(3),CEN(3),rh(3),pregam(3),yy(3)
-C (Anisotropy tensor plus anisotropy centre)
- DIMENSION vca(3),vc(3),vo(3),vn(3),calctemp(3000)
- DIMENSION datres(179),datnam(179),datshift(179)
- DIMENSION RCNET(3000)
- DIMENSION IACODE(50),IRATPT(9,50),IRATS(50)
- DIMENSION shiftt(3000),exptlt(3000),VCHN(3)
- dimension rn(3,50),cent(3,50),signr(50)
- dimension iexp(2000),atexp(2000),pexp(2000),eexp(2000)
- CHARACTER ANAME*4,RES*3,FN1*60,FN3*40,junk*80
- CHARACTER ans*1,FN4*40,pexp*3,resh*3,anameh*4,prott*3
- CHARACTER datres*3,datnam*4,YN*1,atexp*4,FN9*60,RFILE*60
- integer AT1,AT2,AT3,INDX(3000)
- COMMON x,y,z,xh,yh,zh
-C Set values for anisotropies, atomic charges and multiplication
-C factor for electric field: shift=-Ez*sigmaE
- DATA XCO1/-13.0/,XCO2/-4.0/,XCN1/-11.0/,XCN2/1.40/
- DATA sigmaE/0.60/,Qc/1.60/,Qn/-1.70/,Qo/-2.30/
- DATA Qhn/0.70/
-C NB The atomic charges are in esu
-C
-C******************FILE INPUT************************************
- iwarning=1
- type *,'Input file?'
- read(5,999)FN1
-997 format (I)
-98 FORMAT (I5)
-999 format(A)
- type *,'Output file?'
- read(5,999)FN3
- type *,'Calculate for HA[1], HN[2] or all protons[3]?'
- read(5,997)icalculate
- print *,'icalculate=',icalculate
-C NB Actually calculates all protons, just prints differently
-99 FORMAT(A80)
- type *,' Are you comparing calc. to experimental shifts? [N]'
- read(5,970)YN
-970 format(A)
- OPEN(1,file=FN1,STATUS='OLD',readonly)
- OPEN(3,file=FN3)
- type *,' Random file ?'
- read(5,999)RFILE
- open(4,file=RFILE,status='old',readonly)
- do 25 I=1,179 !Random coil shifts
- read(4,998) datres(I),datnam(I),datshift(I)
-998 format(A3,1X,A4,F5.2)
-25 continue
- if(yn.eq.'Y'.or.yn.eq.'y') then
- type *,' File containing experimental shifts?'
- read(5,999)FN4
- OPEN(UNIT=8,FILE=FN4,STATUS='OLD')
-C This file should contain 2-line header, no. of protons (I5) plus list
- type *,'Name of protein in this file?'
- read(5,992) prott
-992 format(A3)
- READ (8,99) JUNK
- READ (8,99) JUNK
- READ (8,98) Iprot
- do 900 II=1,Iprot
- read (8,996) iexp(ii),atexp(ii),pexp(ii),eexp(ii)
-996 format(I3,7X,A4,5X,A3,27X,F9.5)
-900 continue
- endif
- imodel=0
-776 iheavyatom=0
- iproton=0
-C PDB file should end with TER or END or preferably both
- do 10 I=1,100000
- READ (1,99,end=777) JUNK
- if (junk(1:5).eq.'MODEL') then
- read(junk(6:14),'(I9)') nmodel
- imodel=1
- endif
- if (junk(1:6).eq.'ENDMDL') goto 11
- if (junk(1:4).eq.'END') then
- if (imodel.eq.1) goto 777
- goto 11
- endif
-C Replace D by H for neutron structures
- if (junk(14:14).eq.'D') junk(14:14)='H'
- if (junk(1:4).eq.'TER ') goto 11
- if (junk(1:4).eq.'ATOM') then
- if(junk(27:27).ne.' ') print 601,junk(23:26)
-601 format('WARNING: substituted residue present at ',A4)
- if(junk(22:22).ne.' '.and.iwarning.eq.1) then
- iwarning=2
- type *,'WARNING: more than one chain present'
- endif
- if(junk(17:17).ne.' ') print 602,junk(23:26)
-602 format('WARNING: alternate conformations at residue ',A4)
-C Next line reads HN in as heavy atom, for Electric field calc.
- if((junk(14:14).ne.'H').or.(junk(13:15).eq.' H ')) then
- iheavyatom=iheavyatom+1
- read(junk(13:16),'(A4)') aname(iheavyatom)
- read(junk(18:20),'(A3)') res(iheavyatom)
- read(junk(23:26),'(I4)') ires(iheavyatom)
- read(junk(31:54),'(3F8.0)') x(iheavyatom),
- . y(iheavyatom),z(iheavyatom)
- endif
- if(junk(14:14).eq.'H') then
- if((icalculate.eq.1).and.(junk(14:15).ne.'HA'))goto 10
- if((icalculate.eq.2).and.(junk(14:15).ne.'H '))goto 10
- iproton=iproton+1
- read(junk(13:16),'(A4)') anameh(iproton)
- read(junk(18:20),'(A3)') resh(iproton)
- read(junk(23:26),'(I4)') iresh(iproton)
- read(junk(31:38),'(F8.3)') xh(iproton)
- read(junk(39:46),'(F8.3)') yh(iproton)
- read(junk(47:54),'(F8.3)') zh(iproton)
- endif
- endif
-10 CONTINUE
-11 continue
-C To avoid calculating for water molecules
- if(res(1).eq.'WAT'.or.res(2).eq.'WAT') goto 777
-C Now see if protons are present and add them if not
-C
-C Next Line hacked (DvdS, 12/94)
- if ((iproton.eq.0) .or. (icalculate.eq.3)) then
- type *,'Adding protons'
- type *,'Print out file with protons?'
- read(5,607)ANS
- call addprot(x,y,z,xh,yh,zh,Iheavyatom,Iproton,
- & aname,anameh,res,resh,ires,iresh)
- if(ans.eq.'Y'.or.ans.eq.'y') then
- do 670 I=1,60
- if(FN1(I:I).eq.' ')goto 671
-670 continue
-671 ilength=I-1
- if(ilength.lt.40) then
- FN9=FN1(1:ilength-4)//'_protonated.pdb'
- else
- FN9=FN1(ilength-8:ilength-4)//'_protonated.pdn'
- endif
- print 669,FN9
-669 format('Output going to ',A)
- open(9,file=FN9)
- write(9,660)FN1
-660 format('REMARK Generated from ',60A)
- iresstart=ires(1)
- iresend=ires(iheavyatom)
- iline=0
- do 668 icount=iresstart,iresend
- do 661 I=1,iheavyatom
- if(aname(I).eq.' H ') goto 661
- if(ires(I).eq.icount) then
- iline=iline+1
- write(9,662)iline,aname(I),res(I),ires(I),x(I),y(I),z(I)
- endif
-662 format('ATOM',I7,1X,A4,1X,A3,2X,I4,4X,3F8.3)
-661 continue
- do 663 I=1,iproton
- if(iresh(I).eq.icount) then
- iline=iline+1
- write(9,662)iline,anameh(I),resh(I),iresh(I),xh(I),yh(I),zh(I)
- endif
-663 continue
-668 continue
- write(9,665)
- write(9,666)
-665 format('TER')
-666 format('END')
- end if
- end if
- do 20 I=1,iproton
- shift(I)=0.0 !initialise
- anisco(I)=0.0
- aniscn(I)=0.0
- shiftE(I)=0.0
-20 continue
-607 FORMAT(A1)
- type *,' All atoms read...initialising'
- if(imodel.eq.1) type 774, nmodel
-774 format(' Calculating shifts for model',I9)
-C***********Calculate number of aromatic residues, rearrange order of
-C ring atoms, and set pointers to line numbers of aromatic atoms
-C (NB each Trp counts as two rings)
- narom=0
- do 105 I=1,iheavyatom
- if((res(I).eq.'TRP'.or.res(I).eq.'TYR'.or.res(I).eq.'PHE'.
- 1 or.res(I).eq.'HIS').and.(aname(I).eq.' CB ')) THEN
- narom = narom + 1
- do 102 Iring=1,6
- IRATPT(Iring,narom)=0
-102 continue
- IACODE(narom)=IRES(I)
- IF ((res(I).eq.'PHE').or.(res(I).eq.'TYR')) THEN
- IRATS(narom)=6
- do 101 K=1,20
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CG ') IRATPT(1,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CD1') IRATPT(2,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CE1') IRATPT(3,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CZ ') IRATPT(4,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CE2') IRATPT(5,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CD2') IRATPT(6,narom)=I+K
-101 continue
- ELSE IF (res(I).eq.'HIS') THEN
- IRATS(narom)=5
- do 103 K=1,20
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CG ') IRATPT(1,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CD2') IRATPT(2,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' NE2') IRATPT(3,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CE1') IRATPT(4,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' ND1') IRATPT(5,narom)=I+K
-103 continue
- ELSE
-C Trp counts as two aromatic rings (5 then 6)
- IRATS(narom)=5
- do 104 K=1,20
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CG ') IRATPT(1,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CD1') IRATPT(2,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' NE1') IRATPT(3,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CE2') IRATPT(4,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CD2') IRATPT(5,narom)=I+K
-104 continue
- narom = narom + 1
- IACODE(narom)=IRES(I)
- IRATS(narom)=6
- do 106 K=1,25
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CE2') IRATPT(1,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CD2') IRATPT(2,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CE3') IRATPT(3,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CZ3') IRATPT(4,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CH2') IRATPT(5,narom)=I+K
- IF(ires(I+K).eq.ires(I).and.
- & aname(I+K).eq.' CZ2') IRATPT(6,narom)=I+K
-106 continue
- ENDIF
- endif !End of loop for each aromatic residue
-105 continue
- do 107 J=1,narom
- if(iratpt(1,j).eq.0.or.iratpt(2,j).eq.0.or.iratpt(3,j).eq.0.
- & or.iratpt(4,j).eq.0.or.iratpt(5,j).eq.0) print 960,
- & ires(iacode(j)),res(ires(iacode(j)))
-107 continue
-960 format(1X,'Ring atom missing for ',I4,1X,A3)
- DO 115 L=1,iproton !Initialise all ring current shifts to zero
- RCNET(L)=0.
-115 CONTINUE
-C ******************************************************************
- type *,' Calculating ring current shifts....'
-C
- DO 116 J=1,NAROM !FOR EACH AROMATIC RESIDUE
-C Now set up rn (ring normal) and cent for each ring.
-C Determined using atoms 1, 3 and 5 only of ring.
-C Much of this is lifted from a version of AMBER provided by Dave Case
- call plane(IRATPT(1,j),IRATPT(3,j),IRATPT(5,j),x,y,z,rn(1,j),
- . cent(1,j))
-c From pts 1, 3 and 5 calculates rn(ring normal), drn (deriv. of
-c ring normal) and centre of ring
-c
-c -- check on signr of normal vector
-c
- signr(j) = 1.0
- d1cx = x(IRATPT(1,j)) - cent(1,j)
- d1cy = y(IRATPT(1,j)) - cent(2,j)
- d1cz = z(IRATPT(1,j)) - cent(3,j)
- d2cx = x(IRATPT(3,j)) - cent(1,j)
- d2cy = y(IRATPT(3,j)) - cent(2,j)
- d2cz = z(IRATPT(3,j)) - cent(3,j)
- vp1 = d1cy*d2cz - d1cz*d2cy
- vp2 = d1cz*d2cx - d1cx*d2cz
- vp3 = d1cx*d2cy - d1cy*d2cx
- if ((vp3*rn(3,j)+vp2*rn(2,j)+vp1*rn(1,j))
- . .gt.0.0) signr(j) = -1.0
- 119 DO 120 L=1,iproton !For each proton
- ip=L
-C Next line includes self aromatic shift for HA only
- IF(IRESH(L).EQ.IRES(IRATPT(1,J)).AND.(ANAMEH(L)(2:3).NE.
- & 'HA'.AND.ANAMEH(L)(2:3).NE.'H ')) GOTO 120
-c
-c -- skip rings whose centre is more than 15A away
-c
- relc = (xh(ip)-cent(1,j))**2 + (yh(ip)-cent(2,j))**2
- . +(zh(ip)-cent(3,j))**2
- if (relc.gt.225.) go to 120
-c
-c -- loop over pairs of bonded atoms in the ring
-c
- do 80 k=1,irats(j)
- kp1 = k + 1
- if (kp1.gt.irats(j)) kp1 = 1
-c
- call hm(ip,iratpt(k,j),iratpt(kp1,j),x,y,z,xh,yh,zh,
- . rn(1,j),shifthm)
- rcnet(ip) = rcnet(ip)+ signr(j)*5.4548*shifthm
- 80 continue
- 100 continue
-c
-120 continue !PROTON LOOP
- 116 CONTINUE
-C *************BEGIN ANISOTROPY CALCULATION**********************
-C ****Locate all backbone C=O and calculate anisotropic shift****
- type *,' Calculating CO anisotropy...'
- do 30 I=1,iheavyatom
- if (aname(I).ne.' CA ') goto 30
- DO 35 J=1,15
- IF ((ANAME(I+J).EQ.' C ').AND.(IRES(I).EQ.IRES(I+J)))
- 1 then
- Inext=I+J
- GOTO 38
- ENDIF
-35 CONTINUE
- print 95,IRES(I)
-95 format (' C atom not found for residue ',I5)
- goto 30
-38 IF (ANAME(Inext+1).NE.' O ') then
- print 94,IRES(I)
-94 format (' O atom not found for residue ',I5)
- goto 30
- ENDIF
-C Atoms CA, C and O now located at I, Inext and (Inext+1)
- at3=I
- at1=Inext
- at2=Inext+1
- CALL VEC(at1,at2,at3,vx,vy,vz,r)
-C Returns vectors vx,vy,vz, and distance r between at1 and at2
- CALL CENTRE(vz,x(at1),y(at1),z(at1),1.1,cen)
-C
-C Now loop through all H, calculating shift due to this C=O
- do 40 K=1,iproton
- IF(IRESH(K).EQ.IRES(AT1)) GOTO 40 !SELF SHIFT
- CALL RHAT(xh(k),yh(k),zh(k),cen,rh,rlen)
-C Returns vector rh, length rlen, between HA and CEN
- IF(RLEN.GT.12.0) GOTO 40 !distance cutoff
- CALL VPROD(rh,vy,pregam,stheta,tempab)
-C Returns sine of angle theta between rh and vy
- CALL VPROD(pregam,vx,yy,sgamma,tempab)
- calc1=XCO1*((3.0*stheta*stheta)-2.0)
- calc2=XCO2*(1.0-(3.0*stheta*stheta*sgamma*sgamma))
- calc3=(calc1+calc2)/(3.0*rlen*rlen*rlen)
- shift(k)=shift(k)-calc3
- anisco(k)=anisco(k)-calc3
-40 continue
-30 continue
-C if(XCO1.ne.9999.9) goto 9999 !To skip sidechain CO calculation
-C *********************************************************
-C *******************Sidechain CO from Asn, Gln************
- do 530 I=1,iheavyatom
- if(res(I).ne.'ASN'.and.res(I).ne.'GLN') goto 530
- if (aname(I).ne.' CB ') goto 530
- if(res(I).eq.'ASN') then
- if (aname(I+1).ne.' CG '.or.aname(I+2).ne.' OD1') then
- print 595, IRES(I)
- goto 530
-595 format (' Missing atoms for ASN ',I5)
- endif
- at1=I+1
- at2=I+2
- at3=I
- else if(res(I).eq.'GLN') then
- if (aname(I+1).ne.' CG '.or.aname(I+2).ne.' CD '.or.
- 1 aname(I+3).ne.' OE1')then
- print 596, IRES(I)
- goto 530
-596 format (' Missing atoms for GLN ',I5)
- endif
- at1=I+2
- at2=I+3
- at3=I+1
- endif
- CALL VEC(at1,at2,at3,vx,vy,vz,r)
- CALL CENTRE(vz,x(at1),y(at1),z(at1),1.1,cen)
-C Now loop through all HA, calculating shift due to this C=O
- do 540 K=1,iproton
- CALL RHAT(xh(k),yh(k),zh(k),cen,rh,rlen)
- IF(RLEN.GT.12.0) GOTO 540
- CALL VPROD(rh,vy,pregam,stheta,tempab)
- CALL VPROD(pregam,vx,yy,sgamma,tempab)
- calc1=XCO1*((3.0*stheta*stheta)-2.0)
- calc2=XCO2*(1.0-(3.0*stheta*stheta*sgamma*sgamma))
- calc3=(calc1+calc2)/(3.0*rlen*rlen*rlen)
- shift(k)=shift(k)-calc3
- anisco(k)=anisco(k)-calc3
-540 continue
-530 continue
-C *****************************************************
-C *****************Sidechain CO from Asp, Glu**********
- do 630 I=1,iheavyatom
- if(res(I).ne.'ASP'.and.res(I).ne.'GLU') goto 630
- if (aname(I).ne.' CB ') goto 630
- if(res(I).eq.'ASP') then
- if (aname(I+1).ne.' CG '.or.aname(I+2).ne.' OD1'.or.
- 1 aname(I+3).ne.' OD2') then
- print 695, IRES(I)
- goto 630
-695 format (' Missing atoms for ASP ',I5)
- endif
- at1=I+1
- at2=I+2
- at3=I
- else if(res(I).eq.'GLU') then
- if (aname(I+1).ne.' CG '.or.aname(I+2).ne.' CD '.or.
- 1 aname(I+3).ne.' OE1'.or.aname(I+4).ne.' OE2')then
- print 696, IRES(I)
- goto 630
-696 format (' Missing atoms for GLU ',I5)
- endif
- at1=I+2
- at2=I+3
- at3=I+1
- endif
- do 650 Itmp=1,iproton
- calctemp(Itmp)=0.0
-650 continue
- do 667 Icalc=0,1 !loop for two C-O
- at2=at2+Icalc
- CALL VEC(at1,at2,at3,vx,vy,vz,r)
- CALL CENTRE(vz,x(at1),y(at1),z(at1),1.1,cen)
- do 640 K=1,iproton
- CALL RHAT(xh(k),yh(k),zh(k),cen,rh,rlen)
- IF(RLEN.GT.12.0) GOTO 640
- CALL VPROD(rh,vy,pregam,stheta,tempab)
- CALL VPROD(pregam,vx,yy,sgamma,tempab)
- calc1=XCO1*((3.0*stheta*stheta)-2.0)
- calc2=XCO2*(1.0-(3.0*stheta*stheta*sgamma*sgamma))
- calc3=(calc1+calc2)/(3.0*rlen*rlen*rlen)
- calctemp(K)=calctemp(K)+calc3
-640 continue
-667 continue
- do 664 kk=1,iproton
- shift(kk)=shift(kk)-(calctemp(kk)/2.0)
- anisco(kk)=anisco(kk)-(calctemp(kk)/2.0)
-664 continue
-630 continue
-9999 continue
-C *******NOW DO (O=)C-N TOO *****************************
- type *,' Calculating CN anisotropy...'
- do 130 I=1,iheavyatom
- if (aname(I).ne.' C ') goto 130
- IF (ANAME(I+1).NE.' O ') then
- print 94,IRES(I)
- goto 130
- ENDIF
- do 131 j=1,23
- if((aname(I+j).eq.' N ').and.(ires(I).eq.(ires(i+j)-1)))
- 1 then
- Inext=I+J
- GOTO 132
- ENDIF
-131 CONTINUE
- if(ires(I).ne.ires(iheavyatom)) then
- print 194,IRES(I)
-194 format(' N atom not found after residue ',I5)
- endif
- goto 130
-132 at1=I
- at2=Inext
- at3=I+1
- CALL VEC(at1,at2,at3,vx,vy,vz,r)
- rbond=r*0.85 !i.e. 85% along C-N bond
- CALL CENTRE(vz,x(at1),y(at1),z(at1),rbond,cen)
- do 140 K=1,iproton
- CALL RHAT(xh(k),yh(k),zh(k),cen,rh,rlen)
- IF(RLEN.GT.12.0) GOTO 140
- if(anameh(K).eq.' H '.and.(iresh(k).eq.ires(Inext)))
- $ goto 140
- CALL VPROD(rh,vy,pregam,stheta,tempab)
- CALL VPROD(pregam,vx,yy,sgamma,tempab)
- calc1=XCN1*((3.0*stheta*stheta)-2.0)
- calc2=XCN2*(1.0-(3.0*stheta*stheta*sgamma*sgamma))
- calc3=(calc1+calc2)/(3.0*rlen*rlen*rlen)
- shift(k)=shift(k)-calc3
- aniscn(k)=aniscn(k)-calc3
-140 continue
-130 continue
-C *************************************************
-C *******Calculate electric field component********
-C First find C(alpha)-H(alpha) pair, then work through
-C all C, O and N finding field from them
- type *,' Calculating electric field shift...'
- do 2000 ie=1,iproton
-C skip for NH proton
- if(anameh(ie).eq.' H ')goto 2000
- iha=ie
- Ez=0.0
- do 2010 je=1,iheavyatom
-C Find attached heavy atom
- if((ires(je).eq.iresh(ie)).and.(aname(je)(3:3).eq.
- 1 anameh(ie)(3:3))) then
- ica=je
- goto 2020
- endif
-2010 continue
-2020 continue
- call VEC2(iha,ica,vca,rca)
-C Returns vector vca and length rca between H(ie) and CA(je)
-C Now go through each C and add shift due to this
- do 2030 je=1,iheavyatom
- if(ires(je).eq.iresh(iha)) goto 2030
- if(aname(je).eq.' C ') then
- call VEC2(iha,je,vc,rcc)
- if(rcc.gt.6.0) goto 2030 !Ignore for distance>6A
- call VSCAL(vca,vc,sc,cthet)
- Efact=Qc/(rcc*rcc)
- Ez=Ez+(cthet*Efact)
- ELSE if(aname(je).eq.' N ') then
- call VEC2(iha,je,vn,rcn)
- if(rcn.gt.6.0) goto 2030
- call VSCAL(vca,vn,sc,cthet)
- Efact=Qn/(rcn*rcn)
- Ez=Ez+(cthet*Efact)
- ELSE if(aname(je).eq.' O ') then
- call VEC2(iha,je,vo,rco)
- if(rco.gt.6.0) goto 2030
- call VSCAL(vca,vo,sc,cthet)
- Efact=Qo/(rco*rco)
- Ez=Ez+(cthet*Efact)
- ELSE if(aname(je).eq.' H ') then
- call VEC2(iha,je,vchn,rchn)
- if(rchn.gt.6.0) goto 2030
- call VSCAL(vca,vchn,sc,cthet)
- Efact=Qhn/(rchn*rchn)
- Ez=Ez+(cthet*Efact)
- endif
-2030 continue
- shift(ie)=shift(ie)+(Ez*sigmaE)
- shiftE(ie)=shiftE(ie)+(Ez*sigmaE)
-2000 continue
-C ****************END OF CALCULATIONS PROPER********************
-C *Correction of Gly HA shift by 0.22 ppm for random coil effect,
-C subtract 0.20 from HN shift, subtract 0.65 from HA shift,
-C convert to single precision, add random coil shift
- do 2040 kkk=1,iproton
- shift(kkk)=shift(kkk) + rcnet(kkk)
- if(anameh(kkk)(2:3).eq.'HA') shift(kkk)=shift(kkk)-0.65
- if(anameh(kkk)(2:3).eq.'H ') shift(kkk)=shift(kkk)-0.20
- sum(kkk)=rcnet(kkk)+anisco(kkk)+aniscn(kkk)+shiftE(kkk)
- if((resh(kkk).eq.'GLY').and.(anameh(kkk).eq.'1HA '.or.
- 1 anameh(kkk).eq.'2HA '.or.anameh(kkk).eq.' HA1'.or.
- 2 anameh(kkk).eq.' HA2')) shift(kkk)=shift(kkk)+0.22
- do 2050 L=1,179
- IF ((datres(L).eq.resh(kkk)).and.(datnam(L)(2:4).eq.
- 1 anameh(kkk)(2:4))) THEN
-C This next bit replaces HA shifts for aromatics by 4.45 ppm
-C (gives roughly best fit to data)
- if((resh(kkk).eq.'TYR'.or.resh(kkk).eq.'PHE'.or.
- 1 resh(kkk).eq.'TRP'.or.resh(kkk).eq.'HIS').and.anameh(kkk).
- 2 eq.' HA ') then
- final(kkk)=shift(kkk)+4.45
- shift(kkk)=shift(kkk)+4.45-datshift(L)
- ELSE
- final(kkk)=shift(kkk) + datshift(L)
- ENDIF
- ENDIF
-2050 continue
-2040 continue
-9990 continue
-
-C ***************** Output SHIFT to channel 3**********************
- if(yn.ne.'Y'.and.yn.ne.'y') goto 2100
- do 909 ii=1,iprot
- DO 910 KK=1,iproton
- IF(IEXP(ii).EQ.IRESH(KK).AND.pexp(ii).eq.prott.and.
- 1 atexp(ii)(1:2).eq.anameh(kk)(2:3)) THEN
- exptln(kk)=eexp(ii)
-C exptln is the experimental shift: now subtract random coil
- do 2051 L=1,179
- IF ((datres(L).eq.resh(kk)).and.(datnam(L)(1:3).eq.
- 1 anameh(kk)(1:3))) then
- exptln(kk)=exptln(kk) - datshift(L)
- ENDIF
-2051 continue
- exptl(kk)=exptln(kk)
- goto 909
- ENDIF
-910 continue
-909 continue
- if(imodel.eq.1) goto 501
- write (3,988)
-988 format(' Proton name, followed by calc. and observed shift and
- . difference')
- write (3,2052)
-2052 format(' (as shift - random coil shift)')
- do 500 iprnt=1,iproton
- if(exptln(iprnt).ne.0.00)
- 1 write(3,991) iprnt,iresh(iprnt),resh(iprnt),anameh(iprnt),
- 1 shift(iprnt),exptl(iprnt),(shift(iprnt)-exptl(iprnt))
-991 format(I5,I5,1X,A3,2X,A4,3F10.6)
-500 continue
-501 continue
- if(imodel.eq.1) then
- write(3,775) nmodel
-775 format(' Result for model number',I8)
- endif
- CALL STATS(shift,EXPTL,iproton,anameh)
- type *,'Do you want output sorted? [N]'
- read(5,970)ans
- if(ans.ne.'Y'.and.ans.ne.'y') goto 1000
- itemp=0
- do 505 I=1,iproton
- if(exptl(I).eq.0.0) goto 505
- itemp=itemp+1
- shiftt(itemp)=shift(I)
- exptlt(itemp)=exptl(I)
-505 continue
- CALL INDEXX(itemp,shiftt,indx)
- write (3,990)
-C990 format(' Calc Exptl Diff')
-990 format(' Calc Diff')
- do 506 I=1,itemp
-C write (3,989) shiftt(indx(I)),exptlt(indx(I)),
- write (3,983) shiftt(indx(I)),
- 1 (shiftt(indx(I))-exptlt(indx(I)))
-989 format(3F10.4)
-983 format(2F10.4)
-506 continue
- goto 1000
-C **************Normal output starts here***************************
-2100 continue
-C write (3,987) FN1
-987 format(' Shift calculated for protons from ',A)
-C write (3,986)
-986 format(' Added 0.22 for Gly, subtracted 0.65 (HA only), added
- 1random coil shift')
-C write (3,985)
-985 format(' Proton ring anisCO anisCN
- 1sigmaE sum final')
- do 510 ip=1,iproton
- if(icalculate.eq.1.and.anameh(ip)(2:3).ne.'HA') goto 510
- if(icalculate.eq.2.and.anameh(ip)(2:3).ne.'H ') goto 510
-C Now do averaging for Phe,Tyr,methyls
- if((resh(ip).eq.'VAL'.and.(anameh(ip).eq.'1HG1'.or.anameh(ip).
- 1eq.'1HG2')).or.(resh(ip).eq.'LEU'.and.(anameh(ip).eq.'1HD1'.or.
- 2anameh(ip).eq.'1HD2')).or.(resh(ip).eq.'ILE'.and.(anameh(ip).eq.
- 3'1HG2'.or.anameh(ip).eq.'1HD1')).or.(resh(ip).eq.'ALA'.and.
- 4anameh(ip).eq.'1HB ').or.(resh(ip).eq.'THR'.and.anameh(ip).eq.
- 5'1HG2')) THEN
- final(ip)=final(ip)-sum(ip)
- sum(ip)=(sum(ip)+sum(ip+1)+sum(ip+2))/3.0
- anisco(ip)=(anisco(ip)+anisco(ip+1)+anisco(ip+2))/3.0
- aniscn(ip)=(aniscn(ip)+aniscn(ip+1)+aniscn(ip+2))/3.0
- shiftE(ip)=(shiftE(ip)+shiftE(ip+1)+shiftE(ip+2))/3.0
- shift(ip)=(shift(ip)+shift(ip+1)+shift(ip+2))/3.0
- final(ip)=final(ip)+sum(ip)
- final(ip+1)=0.0
- final(ip+2)=0.0
- endif
- if(resh(ip).eq.'TYR'.and.anameh(ip).eq.' HD1') then
- if(anameh(ip+1).eq.' HD2') then
- final(ip)=final(ip)-sum(ip)
- sum(ip)=(sum(ip)+sum(ip+1))/2.0
- anisco(ip)=(anisco(ip)+anisco(ip+1))/2.0
- aniscn(ip)=(aniscn(ip)+aniscn(ip+1))/2.0
- shiftE(ip)=(shiftE(ip)+shiftE(ip+1))/2.0
- shift(ip)=(shift(ip)+shift(ip+1))/2.0
- final(ip)=final(ip)+sum(ip)
- final(ip+1)=0.0
- else
- type 940,resh(ip),iresh(ip)
-940 format(' Ring protons in unexpected order for ',A3,I4)
- endif
- endif
- if(resh(ip).eq.'TYR'.and.anameh(ip).eq.' HE1') then
- if(anameh(ip+1).eq.' HE2') then
- final(ip)=final(ip)-sum(ip)
- sum(ip)=(sum(ip)+sum(ip+1))/2.0
- anisco(ip)=(anisco(ip)+anisco(ip+1))/2.0
- aniscn(ip)=(aniscn(ip)+aniscn(ip+1))/2.0
- shiftE(ip)=(shiftE(ip)+shiftE(ip+1))/2.0
- shift(ip)=(shift(ip)+shift(ip+1))/2.0
- final(ip)=final(ip)+sum(ip)
- final(ip+1)=0.0
- else
- type 940,resh(ip),iresh(ip)
- endif
- endif
- if(resh(ip).eq.'PHE'.and.anameh(ip).eq.' HD1') then
- if(anameh(ip+1).eq.' HD2') then
- final(ip)=final(ip)-sum(ip)
- sum(ip)=(sum(ip)+sum(ip+1))/2.0
- anisco(ip)=(anisco(ip)+anisco(ip+1))/2.0
- aniscn(ip)=(aniscn(ip)+aniscn(ip+1))/2.0
- shiftE(ip)=(shiftE(ip)+shiftE(ip+1))/2.0
- shift(ip)=(shift(ip)+shift(ip+1))/2.0
- final(ip)=final(ip)+sum(ip)
- final(ip+1)=0.0
- else
- type 940,resh(ip),iresh(ip)
- endif
- endif
- if(resh(ip).eq.'PHE'.and.anameh(ip).eq.' HE1') then
- if(anameh(ip+1).eq.' HE2') then
- final(ip)=final(ip)-sum(ip)
- sum(ip)=(sum(ip)+sum(ip+1))/2.0
- anisco(ip)=(anisco(ip)+anisco(ip+1))/2.0
- aniscn(ip)=(aniscn(ip)+aniscn(ip+1))/2.0
- shiftE(ip)=(shiftE(ip)+shiftE(ip+1))/2.0
- shift(ip)=(shift(ip)+shift(ip+1))/2.0
- final(ip)=final(ip)+sum(ip)
- final(ip+1)=0.0
- else
- type 940,resh(ip),iresh(ip)
- endif
- endif
-C ******Write out results*********************
- if(final(ip).ne.0.0) write(3,984)ip,iresh(ip),resh(ip),
- 1 anameh(ip),rcnet(ip),anisco(ip),aniscn(ip),shiftE(ip),
- 2 shift(ip),final(ip)
-984 format(I5,I5,1X,A3,2X,A4,6F10.5)
-510 CONTINUE
-1000 continue
- imodel=1 !to make it work for single structure
- goto 776
-C Hacked DvdS 10/98
- 777 continue
- print *,'Closing unit 3'
- close(3)
-C
- STOP
- END
-C *******************************************************
- SUBROUTINE VEC(at1,at2,at3,vx,vy,vz,r)
- COMMON X,Y,Z
- DIMENSION X(5000),Y(5000),Z(5000),vx(3),vy(3),vz(3)
- DIMENSION vvx(3),vvy(3),vvz(3)
- INTEGER at1,at2,at3
- x1=x(at1)
- y1=y(at1)
- z1=z(at1)
- x2=x(at2)
- y2=y(at2)
- z2=z(at2)
- x3=x(at3)
- y3=y(at3)
- z3=z(at3)
- vvz(1)=x2-x1
- vvz(2)=y2-y1
- vvz(3)=z2-z1
- CALL UNITV(vvz,vz,r)
- vvz(1)=x3-x1
- vvz(2)=y3-y1
- vvz(3)=z3-z1
- CALL VPROD(vz,vvz,vvy,sthet,tempab)
- vvy(1)=tempab
- CALL UNITV(vvy,vy,D)
- CALL VPROD(vz,vy,vvx,sthet,tempab)
- CALL UNITV(vvx,vx,D)
- return
- end
-C ******************************************************
- SUBROUTINE UNITV(U,U1,D)
- DIMENSION U(3),U1(3)
- D=0.0
- DO 1 JJ=1,3
- D=D+(U(JJ)*U(JJ))
-1 CONTINUE
- D=SQRT(D)
- If (D.EQ.0.0) type *,' D is zero in UNITV'
- DO 2 JJ=1,3
- U1(JJ)=U(JJ)/D
-2 CONTINUE
- RETURN
- END
-C **********************************************************
- SUBROUTINE VPROD(A,B,AB,STHET,tempab)
- DIMENSION A(3),B(3),AB(3)
- AB(2)=A(3)*B(1) - A(1)*B(3)
- AB(1)=A(2)*B(3) - A(3)*B(2)
- AB(3)=A(1)*B(2) - A(2)*B(1)
- tempab=AB(1)
-c This is a stupid thing to do, but it's the only way I can get it
-c to behave!
- R1=SQRT(AB(1)*AB(1) + AB(2)*AB(2) + AB(3)*AB(3))
- RA=SQRT(A(1)*A(1) + A(2)*A(2) + A(3)*A(3))
- RB=SQRT(B(1)*B(1) + B(2)*B(2) + B(3)*B(3))
- IF(RA.EQ.0.0.OR.RB.EQ.0.0) THEN
- type *,' VPROD Zero divide...ignore',RA,RB
- STHET=0.0
- ELSE
- STHET=R1/(RA*RB)
- ENDIF
- RETURN
- END
-C *******************************************************
- SUBROUTINE CENTRE(vz,a1,a2,a3,dist,cen)
- DIMENSION vz(3),cen(3)
- cen(1)=a1+(vz(1)*dist)
- cen(2)=a2+(vz(2)*dist)
- cen(3)=a3+(vz(3)*dist)
- return
- end
-C ********************************************************
- SUBROUTINE RHAT(ax,ay,az,cen,rh,rlen)
- DIMENSION cen(3),rh(3)
- rh(1)=ax-cen(1)
- rh(2)=ay-cen(2)
- rh(3)=az-cen(3)
- rlen=sqrt(rh(1)*rh(1)+rh(2)*rh(2)+rh(3)*rh(3))
- return
- end
-C ********************************************************
- SUBROUTINE STATS(SSHIFT,EXPTL,iproton,anameh)
- dimension sshift(3000),exptl(3000),anameh(3000)
- dimension zshift(3000),zexptl(3000)
-C Calculates mean and sd of iproton values of shift and exptl
-C also mean and sd of (shift-exptl) and regression coeff
-C Values of exptl of 0.00 presumably not found in protha.out
-C and are excluded
- itemp=0
- do 5 I=1,iproton
- if(exptl(I).eq.0.0) goto 5
- itemp=itemp+1
- if(anameh(I).eq.'1HA '.and.anameh(I+1).eq.'2HA ') then
- sshift(I)=(sshift(I)+sshift(I+1))/2.0
- endif
- zshift(itemp)=sshift(I)
- zexptl(itemp)=exptl(I)
-5 continue
- sm1=0.0
- sm2=0.0
- sms1=0.0
- sms2=0.0
- sm3=0.0
- sms3=0.0
- sm4=0.0
-C sm1,sm2 are accumulated sums of shift and exptl
-C sms1,sms2 are accumulated sums of shift**2 and exptl**2
- do 600 L=1,itemp
- sm1=sm1+zshift(L)
- sm2=sm2+zexptl(L)
- sm3=sm3+(zshift(L)-zexptl(L))
-600 continue
- sm1=sm1/float(itemp)
- sm2=sm2/float(itemp)
- sm3=sm3/float(itemp)
- do 605 L=1,itemp
- sms1=sms1+((zshift(L)-sm1)*(zshift(L)-sm1))
- sms2=sms2+((zexptl(L)-sm2)*(zexptl(L)-sm2))
- sms3=sms3+((zshift(L)-zexptl(L)-sm3)*(zshift(L)-zexptl(L)-sm3))
-605 continue
- sms1=sqrt(sms1/float(itemp))
- sms2=sqrt(sms2/float(itemp))
- sms3=sqrt(sms3/float(itemp))
- do 610 L=1,itemp
- sm4=sm4+((zshift(L)-sm1)*(zexptl(L)-sm2))
-610 continue
- sm4=sm4/(float(itemp)*sms1*sms2)
- write (3,1000) sm1,sm2
-1000 format(' Means of calc and exptl shifts: ',F6.4,
- 1 1X,F6.4)
- write (3,1001) sms1,sms2
-1001 format(' SD of calc and exptl shifts: ',F6.4,
- 1 1X,F6.4)
- write (3,1002) sm3,sms3
-1002 format(' Mean and SD of (calc-exptl shift): ',F6.4,
- 1 1X,F6.4)
- write (3,1003) sm4,itemp
-1003 format (' Correlation coefficient calc vs exptl: ',F7.5,
- 1 ' (',I4,' protons )')
- return
- end
-C ************************************************
- SUBROUTINE VEC2(iha,ica,vca,rca)
- DIMENSION vca(3),x(5000),y(5000),z(5000)
- DIMENSION xh(3000),yh(3000),zh(3000)
- COMMON x,y,z,xh,yh,zh
- vca(1)=xh(iha)-x(ica)
- vca(2)=yh(iha)-y(ica)
- vca(3)=zh(iha)-z(ica)
- rca=sqrt((vca(1)*vca(1))+(vca(2)*vca(2))+(vca(3)*vca(3)))
- return
- end
-C *******************************************
- SUBROUTINE VSCAL(A,B,SC,CTHET)
- DIMENSION A(3),B(3)
- SC=A(1)*B(1)+A(2)*B(2)+A(3)*B(3)
- RA=SQRT(A(1)*A(1)+A(2)*A(2)+A(3)*A(3))
- RB=SQRT(B(1)*B(1)+B(2)*B(2)+B(3)*B(3))
- CTHET=SC/(RA*RB)
- RETURN
- END
-C **********************************************
- SUBROUTINE INDEXX(N,ARRIN,INDX)
-C Indexes an array ARRIN of length N, i.e. outputs array INDX
-C such that ARRIN(INDX(J)) is in ascending order.
-C Taken from 'Numerical Recipes', W.H.Press et al, CUP 1989
- DIMENSION ARRIN(3000),INDX(3000)
- DO 11 J=1,N
- INDX(J)=J
-11 CONTINUE
- IF(N.EQ.1) RETURN
- L=N/2+1
- IR=N
-10 CONTINUE
- IF(L.GT.1) THEN
- L=L-1
- INDXT=INDX(L)
- Q=ARRIN(INDXT)
- ELSE
- INDXT=INDX(IR)
- Q=ARRIN(INDXT)
- INDX(IR)=INDX(1)
- IR=IR-1
- IF(IR.EQ.1) THEN
- INDX(1)=INDXT
- RETURN
- ENDIF
- ENDIF
- I=L
- J=L+L
-20 IF(J.LE.IR) THEN
- IF(J.LT.IR) THEN
- IF(ARRIN(INDX(J)).LT.ARRIN(INDX(J+1)))J=J+1
- ENDIF
- IF(Q.LT.ARRIN(INDX(J))) THEN
- INDX(I)=INDX(J)
- I=J
- J=J+J
- ELSE
- J=IR+1
- ENDIF
- GO TO 20
- ENDIF
- INDX(I)=INDXT
- GOTO 10
- END
-c**********************************************************
- subroutine hm(ip,ir1,ir2,x,y,z,xh,yh,zh,rn,shhm)
-c
-c Subroutine Haigh-Mallion:
-c -- given proton ip, and ring atoms ir1 and ir2, with
-c coordinates x and ring normal vector rn;
-c -- return Haigh-Maillion shift contribution shhm
-c
- dimension x(5000),y(5000),z(5000),xh(3000),yh(3000)
- dimension rn(3),r1(3),r2(3),zh(3000)
-c
-c --- extract coordinates from array x,y,z
-c
- r1(1)=x(ir1) - xh(ip)
- r1(2)=y(ir1) - yh(ip)
- r1(3)=z(ir1) - zh(ip)
- r2(1)=x(ir2) - xh(ip)
- r2(2)=y(ir2) - yh(ip)
- r2(3)=z(ir2) - zh(ip)
-c
-c -- compute triple scalar product: later versions could
-c hard-code this for efficiency, but this form is
-c easier to read. (Triple scalar product=vol. of
-c parallelepiped, =area of desired triangle)
-c
- s12 = r1(1)*(r2(2)*rn(3) - r2(3)*rn(2))
- . + r1(2)*(r2(3)*rn(1) - r2(1)*rn(3))
- . + r1(3)*(r2(1)*rn(2) - r2(2)*rn(1))
-c
-c -- get radial factors
-c
- r1sq = r1(1)*r1(1) + r1(2)*r1(2) + r1(3)*r1(3)
- r2sq = r2(1)*r2(1) + r2(2)*r2(2) + r2(3)*r2(3)
- if (r1sq.eq.0.0 .or. r2sq.eq.0.0) then
- write(6,*) 'Geometry error in hm: ',ip,r1,r2
- stop
- end if
- temp = (1./r1sq**1.5 + 1./r2sq**1.5)*0.5 !distance bit
- shhm = s12*temp
- return
- end
-C****************************************************************
- subroutine plane (i1, i2, i3, x,y,z, rn, cent)
-c**************************************************************
-c --- given three atoms i1,i2 and i3, and coordinates x,y,z
-c - returns rn(i) [i=1,2,3] components of the normalized
-c vector normal to the plane containing the three
-c points and cent(1,2,3), the centre of the three atom.
-c
- dimension x(5000),y(5000),z(5000)
- dimension rn(3),cent(3)
-c
- x1 = x(i1)
- y1 = y(i1)
- z1 = z(i1)
- x2 = x(i2)
- y2 = y(i2)
- z2 = z(i2)
- x3 = x(i3)
- y3 = y(i3)
- z3 = z(i3)
-c
-c ----- coefficients of the equation for the plane of atoms 1-3
-c
- ax = y1*z2 - y2*z1 + y3*z1 - y1*z3 + y2*z3 - y3*z2
- ay = -(x1*z2 - x2*z1 + x3*z1 - x1*z3 + x2*z3 - x3*z2)
- az = x1*y2 - x2*y1 + x3*y1 - x1*y3 + x2*y3 - x3*y2
- anorm = 1./sqrt(ax*ax + ay*ay + az*az)
-c
-c ----- normalize to standard form for plane equation (i.e. such
-c ----- that length of the vector "a" is unity
-c
- rn(1) = ax*anorm !ring normal unit vector
- rn(2) = ay*anorm !=(2-1)x(3-1)
- rn(3) = az*anorm !divided by its magnitude
-c
- cent(1) = (x1+x2+x3)/3.
- cent(2) = (y1+y2+y3)/3.
- cent(3) = (z1+z2+z3)/3.
-c
- return
- end
-C ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- subroutine addprot(x,y,z,xh,yh,zh,Iheavyatom,Iproton,
- & aname,anameh,res,resh,ires,iresh)
-C Does not add most exchangeable protons: N-terminal NH3,
-C Glu,Gln,Asp,Asn sidechain, Arg sidechain,Tyr HH, His HD1,
-C Trp HE1, Ser & Thr OH, Cys SH, Lys NH3
-C Goes through heavy atom list and adds in simple geometric way
-C NB Looks in neighbourhood of attached heavy atom for bonding
-C atoms. If the atom ordering is odd, this could cause problems.
-C Usually this would mean that the proton does not get added;
-C very occasionally it could lead to a proton being put on wrong.
- DIMENSION x(5000),y(5000),z(5000),xh(3000),yh(3000),zh(3000)
- DIMENSION aname(5000),res(5000),ires(5000)
- DIMENSION anameh(3000),resh(3000),iresh(3000)
- CHARACTER aname*4,anameh*4,res*3,resh*3
- iproton=0
-C NB This effectively deletes any protons that already were in the file
- do 10 I=1,iheavyatom
- iat2=0
- iat3=0
- iat4=0
- if(aname(I).eq.' N '.and.ires(I).gt.1.and.res(I).
- & ne.'PRO') then
- iat1=I
- do 11 J=1,13
- if(aname(I-J).eq.' C '.and.ires(I-J).eq.ires(I)-1) then
- iat2=I-J
- goto 12
- endif
-11 continue
-12 continue
- do 13 J=1,15
- if(aname(I+J).eq.' CA '.and.ires(I+J).eq.ires(I)) then
- iat3=I+J
- goto 14
- endif
-13 continue
-14 continue
- if(iat2.gt.0.and.iat3.gt.0) then
- iproton=iproton+1
- iheavyatom=iheavyatom+1
- call addsp2(x,y,z,xh,yh,zh,iproton,iat1,iat2,iat3,1)
- anameh(iproton)=' H '
- resh(iproton)=res(iat1)
- iresh(iproton)=ires(iat1)
- x(iheavyatom)=xh(iproton)
- y(iheavyatom)=yh(iproton)
- z(iheavyatom)=zh(iproton)
- aname(iheavyatom)=' H '
- res(iheavyatom)=res(iat1)
- ires(iheavyatom)=ires(iat1)
-C The final 1 signals that it is an NH ie use NH bond distance
- endif
- else if (aname(I).eq.' CA '.and.res(I).ne.'GLY') then
- iat1=I
- do 21 J=-5,3
- if(aname(I+J).eq.' N '.and.ires(I+J).eq.ires(I)) then
- iat2=I+J
- goto 22
- endif
-21 continue
-22 continue
- do 23 J=1,15
- if(aname(I+J).eq.' C '.and.ires(I+J).eq.ires(I)) then
- iat3=I+J
- goto 24
- endif
-23 continue
-24 continue
- do 25 J=1,15
- if(aname(I+J).eq.' CB '.and.ires(I+J).eq.ires(I)) then
- iat4=I+J
- goto 26
- endif
-25 continue
-26 continue
- if(iat2.gt.0.and.iat3.gt.0.and.iat4.gt.0) then
- iproton=iproton+1
- call addonesp3(x,y,z,xh,yh,zh,iproton,iat1,iat2,iat3,iat4)
- anameh(iproton)=' HA '
- resh(iproton)=res(iat1)
- iresh(iproton)=ires(iat1)
- endif
- else if((aname(I).eq.' CB '.and.(res(I).eq.'THR'.or.
- & res(I).eq.'VAL'.or.res(I).eq.'ILE')).or.(aname(I).
- & eq.' CG '.and.res(I).eq.'LEU')) then
- iat1=I
- do 31 J=1,6
- if(aname(I-J).eq.' CA '.and.ires(I-J).eq.ires(I).
- & and.res(I).ne.'LEU') then
- iat2=I-J
- goto 32
- endif
-31 continue
-32 continue
- do 33 J=1,6
- if(res(I-J).eq.'LEU'.and.aname(I-J).eq.' CB ') then
- iat2=I-J
- goto 34
- endif
-33 continue
-34 continue
- do 35 J=1,3
- if(res(I+J).eq.'THR'.and.aname(I+J)(2:3).eq.'OG')
- $ iat3=I+J
- if(res(I+J).eq.'THR'.and.aname(I+J)(2:3).eq.'CG')
- $ iat4=I+J
- if(res(I+J).eq.'VAL'.and.aname(I+J).eq.' CG1') iat3=I+J
- if(res(I+J).eq.'VAL'.and.aname(I+J).eq.' CG2') iat4=I+J
- if(res(I+J).eq.'ILE'.and.aname(I+J).eq.' CG1') iat3=I+J
- if(res(I+J).eq.'ILE'.and.aname(I+J).eq.' CG2') iat4=I+J
- if(res(I+J).eq.'LEU'.and.aname(I+J).eq.' CD1') iat3=I+J
- if(res(I+J).eq.'LEU'.and.aname(I+J).eq.' CD2') iat4=I+J
-35 continue
- if(iat2.gt.0.and.iat3.gt.0.and.iat4.gt.0) then
- iproton=iproton+1
- call addonesp3(x,y,z,xh,yh,zh,iproton,iat1,iat2,iat3,iat4)
- if(res(I).eq.'LEU') then
- anameh(iproton)=' HG '
- else
- anameh(iproton)=' HB '
- endif
- resh(iproton)=res(iat1)
- iresh(iproton)=ires(iat1)
- endif
- else if(aname(I).eq.' CA '.and.res(I).eq.'GLY') then
- iat1=I
- do 41 J=-2,2
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' N ')iat3=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' C ')iat2=I+J
-41 continue
- if(iat2.gt.0.and.iat3.gt.0) then
- iproton=iproton+2
- call addtwosp3(x,y,z,xh,yh,zh,iproton,iat1,iat2,iat3)
- anameh(iproton-1)='1HA '
- anameh(iproton)='2HA '
- resh(iproton-1)=res(iat1)
- resh(iproton)=res(iat1)
- iresh(iproton-1)=ires(iat1)
- iresh(iproton)=ires(iat1)
- endif
- else if(aname(I).eq.' CB '.and.(res(I).eq.'CYS'.or.res(I).
- 1 eq.'ASP'.or.res(I).eq.'GLU'.or.res(I).eq.'PHE'.or.res(I).
- 2 eq.'HIS'.or.res(I).eq.'LYS'.or.res(I).eq.'LEU'.or.res(I).
- 3 eq.'MET'.or.res(I).eq.'ASN'.or.res(I).eq.'PRO'.or.res(I).
- 4 eq.'GLN'.or.res(I).eq.'ARG'.or.res(I).eq.'SER'.or.res(I).
- 5 eq.'TRP'.or.res(I).eq.'TYR')) then
- iat1=I
- do 42 J=-3,3
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CA ')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J)(3:3).eq.'G')
- & iat3=I+J
-42 continue
- if(iat2.gt.0.and.iat3.gt.0) then
- iproton=iproton+2
- call addtwosp3(x,y,z,xh,yh,zh,iproton,iat1,iat2,iat3)
- anameh(iproton-1)='1HB '
- anameh(iproton)='2HB '
- resh(iproton-1)=res(iat1)
- resh(iproton)=res(iat1)
- iresh(iproton-1)=ires(iat1)
- iresh(iproton)=ires(iat1)
- endif
- else if((aname(I).eq.' CG '.and.(res(I).eq.'GLU'.or.res(I).
- 1 eq.'LYS'.or.res(I).eq.'MET'.or.res(I).eq.'PRO'.or.res(I).
- 2 eq.'GLN'.or.res(I).eq.'ARG')).or.(aname(I).eq.' CG1'.and.
- 3 res(I).eq.'ILE')) then
- iat1=I
- do 43 J=-3,3
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CB ')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J)(3:3).eq.'D')
- & iat3=I+J
-43 continue
- if(iat2.gt.0.and.iat3.gt.0) then
- iproton=iproton+2
- call addtwosp3(x,y,z,xh,yh,zh,iproton,iat1,iat2,iat3)
- anameh(iproton-1)='1HG '
- anameh(iproton)='2HG '
- if(res(I).eq.'ILE')anameh(iproton-1)='1HG1'
- if(res(I).eq.'ILE')anameh(iproton)='2HG1'
- resh(iproton-1)=res(iat1)
- resh(iproton)=res(iat1)
- iresh(iproton-1)=ires(iat1)
- iresh(iproton)=ires(iat1)
- endif
- else if(aname(I).eq.' CD '.and.(res(I).eq.'LYS'.or.res(I).
- 1 eq.'ARG'.or.res(I).eq.'PRO')) then
- iat1=I
- do 44 J=-6,3
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CG ')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J)(3:3).eq.'E')
- & iat3=I+J
- if(ires(I+J).eq.ires(I).and.res(I).eq.'PRO'.and.
- & aname(I+J).eq.' N ')iat3=I+J
-44 continue
- if(iat2.gt.0.and.iat3.gt.0) then
- iproton=iproton+2
- call addtwosp3(x,y,z,xh,yh,zh,iproton,iat1,iat2,iat3)
- anameh(iproton-1)='1HD '
- anameh(iproton)='2HD '
- resh(iproton-1)=res(iat1)
- resh(iproton)=res(iat1)
- iresh(iproton-1)=ires(iat1)
- iresh(iproton)=ires(iat1)
- endif
- else if(aname(I).eq.' CE '.and.res(I).eq.'LYS') then
- iat1=I
- do 45 J=-3,3
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CD ')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J)(3:3).eq.'Z')
- & iat3=I+J
-45 continue
- if(iat2.gt.0.and.iat3.gt.0) then
- iproton=iproton+2
- call addtwosp3(x,y,z,xh,yh,zh,iproton,iat1,iat2,iat3)
- anameh(iproton-1)='1HE '
- anameh(iproton)='2HE '
- resh(iproton-1)=res(iat1)
- resh(iproton)=res(iat1)
- iresh(iproton-1)=ires(iat1)
- iresh(iproton)=ires(iat1)
- endif
- else if(aname(I).eq.' CB '.and.res(I).eq.'ALA') then
- iat1=I
- do 51 J=1,5
- if(ires(I-J).eq.ires(I).and.aname(I-J).eq.' CA ')iat2=I-J
- if(ires(I-J).eq.ires(I).and.aname(I-J).eq.' N ')iat3=I-J
-51 continue
- if(iat2.gt.0.and.iat3.gt.0)goto 52
- else if((aname(I)(2:3).eq.'CG'.and.(res(I).eq.'VAL'.or.res(I).
- 1 eq.'THR')).or.(aname(I).eq.' CG2'.and.res(I).eq.'ILE'))then
- iat1=I
- do 53 J=1,5
- if(ires(I-J).eq.ires(I).and.aname(I-J).eq.' CB ')iat2=I-J
- if(ires(I-J).eq.ires(I).and.aname(I-J).eq.' CA ')iat3=I-J
-53 continue
- if(iat2.gt.0.and.iat3.gt.0)goto 52
- else if(aname(I)(2:3).eq.'CD'.and.(res(I).eq.'LEU'.or.res(I).
- 1 eq.'ILE'))then
- iat1=I
- do 54 J=1,5
- if(ires(I-J).eq.ires(I).and.aname(I-J)(2:3).eq.'CG')iat2=I-J
- if(ires(I-J).eq.ires(I).and.aname(I-J).eq.' CB ')iat3=I-J
-54 continue
- if(iat2.gt.0.and.iat3.gt.0)goto 52
- else if(aname(I)(2:3).eq.'CE'.and.res(I).eq.'MET')then
- iat1=I
- do 55 J=1,5
- if(ires(I-J).eq.ires(I).and.aname(I-J).eq.' SD ')iat2=I-J
- if(ires(I-J).eq.ires(I).and.aname(I-J).eq.' CG ')iat3=I-J
-55 continue
- if(iat2.gt.0.and.iat3.gt.0) then
-52 iproton=iproton+3
- call addthreesp3(x,y,z,xh,yh,zh,iproton,iat1,iat2,iat3)
- anameh(iproton-2)='1H '
- anameh(iproton-1)='2H '
- anameh(iproton)='3H '
- anameh(iproton-2)(3:4)=aname(iat1)(3:4)
- anameh(iproton-1)(3:4)=aname(iat1)(3:4)
- anameh(iproton)(3:4)=aname(iat1)(3:4)
- resh(iproton-2)=res(iat1)
- resh(iproton-1)=res(iat1)
- resh(iproton)=res(iat1)
- iresh(iproton-2)=ires(iat1)
- iresh(iproton-1)=ires(iat1)
- iresh(iproton)=ires(iat1)
- endif
- else if((res(I).eq.'TYR'.or.res(I).eq.'PHE'.or.res(I).eq.
- 1 'TRP').and.aname(I).eq.' CD1')then
- iat1=I
- do 61 J=-5,5
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CG ')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J)(3:4).eq.'E1')iat3=I+J
-61 continue
- if(iat2.gt.0.and.iat3.gt.0) goto 62
- else if((res(I).eq.'TYR'.or.res(I).eq.'PHE'.or.res(I).eq.
- 1 'HIS').and.aname(I).eq.' CD2') then
- iat1=I
- do 63 J=-5,5
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CG ')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J)(3:4).eq.'E2')iat3=I+J
-63 continue
- if(iat2.gt.0.and.iat3.gt.0) goto 62
- else if((res(I).eq.'TYR'.or.res(I).eq.'PHE').and.aname(I).
- 1 eq.' CE1') then
- iat1=I
- do 64 J=-5,5
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CD1')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CZ ')iat3=I+J
-64 continue
- if(iat2.gt.0.and.iat3.gt.0) goto 62
- else if((res(I).eq.'TYR'.or.res(I).eq.'PHE').and.aname(I).
- 1 eq.' CE2') then
- iat1=I
- do 65 J=-5,5
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CD2')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CZ ')iat3=I+J
-65 continue
- if(iat2.gt.0.and.iat3.gt.0) goto 62
- else if((res(I).eq.'PHE').and.aname(I).eq.' CZ ') then
- iat1=I
- do 66 J=-5,5
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CE1')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CE2')iat3=I+J
-66 continue
- if(iat2.gt.0.and.iat3.gt.0) goto 62
- else if(res(I).eq.'HIS'.and.aname(I).eq.' CE1') then
- iat1=I
- do 67 J=-5,5
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' ND1')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' NE2')iat3=I+J
-67 continue
- if(iat2.gt.0.and.iat3.gt.0) goto 62
- else if(res(I).eq.'TRP'.and.aname(I).eq.' CE3') then
- iat1=I
- do 68 J=-8,8
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CD2')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CZ3')iat3=I+J
-68 continue
- if(iat2.gt.0.and.iat3.gt.0) goto 62
- else if(res(I).eq.'TRP'.and.aname(I).eq.' CZ3') then
- iat1=I
- do 69 J=-8,8
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CE3')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CH2')iat3=I+J
-69 continue
- if(iat2.gt.0.and.iat3.gt.0) goto 62
- else if(res(I).eq.'TRP'.and.aname(I).eq.' CH2') then
- iat1=I
- do 70 J=-8,8
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CZ3')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CZ2')iat3=I+J
-70 continue
- if(iat2.gt.0.and.iat3.gt.0) goto 62
- else if(res(I).eq.'TRP'.and.aname(I).eq.' CZ2') then
- iat1=I
- do 71 J=-8,8
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CH2')iat2=I+J
- if(ires(I+J).eq.ires(I).and.aname(I+J).eq.' CE2')iat3=I+J
-71 continue
- if(iat2.gt.0.and.iat3.gt.0) then
-62 iproton=iproton+1
- call addsp2(x,y,z,xh,yh,zh,iproton,iat1,iat2,iat3,2)
- anameh(iproton)=' H '
- anameh(iproton)(3:4)=aname(iat1)(3:4)
- resh(iproton)=res(iat1)
- iresh(iproton)=ires(iat1)
- endif
- else
-C presumably a heavy atom that doesn't have protons, or one
-C with exchangeable protons that I can't be bothered to do
- endif
-10 continue
- return
- end
-C===================================================================
- subroutine addsp2(x,y,z,xh,yh,zh,Ih,Iat1,Iat2,Iat3,Ibond)
- DIMENSION x(5000),y(5000),z(5000)
- DIMENSION xh(3000),yh(3000),zh(3000)
- DIMENSION r12(3),u12(3),r13(3),u13(3),r14(3),u14(3)
-C If Ibond=1, it's a NH bond, if Ibond=2 it's a CH (aromatic) bond
- if(Ibond.eq.1)blength=0.98
- if(Ibond.eq.2)blength=1.08
- r12(1)=x(Iat1)-x(Iat2)
- r12(2)=y(Iat1)-y(Iat2)
- r12(3)=z(Iat1)-z(Iat2)
- call unitv(r12,u12,d)
- r13(1)=x(Iat1)-x(Iat3)
- r13(2)=y(Iat1)-y(Iat3)
- r13(3)=z(Iat1)-z(Iat3)
- call unitv(r13,u13,d)
- r14(1)=u12(1)+u13(1)
- r14(2)=u12(2)+u13(2)
- r14(3)=u12(3)+u13(3)
- call unitv(r14,u14,d)
- xh(Ih)=x(Iat1)+blength*u14(1)
- yh(Ih)=y(Iat1)+blength*u14(2)
- zh(Ih)=z(Iat1)+blength*u14(3)
- return
- end
-C------------------------------------------------------------------
- subroutine addonesp3(x,y,z,xh,yh,zh,Ih,Iat1,Iat2,Iat3,Iat4)
- DIMENSION x(5000),y(5000),z(5000)
- DIMENSION xh(3000),yh(3000),zh(3000)
- DIMENSION r12(3),u12(3),r13(3),u13(3),r14(3),u14(3)
- DIMENSION r15(3),u15(3)
- blength=1.08
- r12(1)=x(Iat1)-x(Iat2)
- r12(2)=y(Iat1)-y(Iat2)
- r12(3)=z(Iat1)-z(Iat2)
- call unitv(r12,u12,d)
- r13(1)=x(Iat1)-x(Iat3)
- r13(2)=y(Iat1)-y(Iat3)
- r13(3)=z(Iat1)-z(Iat3)
- call unitv(r13,u13,d)
- r14(1)=x(Iat1)-x(Iat4)
- r14(2)=y(Iat1)-y(Iat4)
- r14(3)=z(Iat1)-z(Iat4)
- call unitv(r14,u14,d)
- r15(1)=u12(1)+u13(1)+u14(1)
- r15(2)=u12(2)+u13(2)+u14(2)
- r15(3)=u12(3)+u13(3)+u14(3)
- call unitv(r15,u15,d)
- xh(Ih)=x(Iat1)+blength*u15(1)
- yh(Ih)=y(Iat1)+blength*u15(2)
- zh(Ih)=z(Iat1)+blength*u15(3)
- return
- end
-C------------------------------------------------------------------
- subroutine addtwosp3(x,y,z,xh,yh,zh,Ih,Iat1,Iat2,Iat3)
-C This is based on the GEN routine in VNMR (J. Hoch)
- DIMENSION x(5000),y(5000),z(5000)
- DIMENSION xh(3000),yh(3000),zh(3000)
- DIMENSION r12(3),r13(3),side(3),us(3)
- DIMENSION add(3),uadd(3),sub(3),usub(3)
- blength=1.08
- alpha=54.75*3.14159/180. !H-C-H=109.5
- r12(1)=x(Iat1)-x(Iat2)
- r12(2)=y(Iat1)-y(Iat2)
- r12(3)=z(Iat1)-z(Iat2)
- r13(1)=x(Iat1)-x(Iat3)
- r13(2)=y(Iat1)-y(Iat3)
- r13(3)=z(Iat1)-z(Iat3)
- sub(1)=r12(1)-r13(1)
- sub(2)=r12(2)-r13(2)
- sub(3)=r12(3)-r13(3)
- call unitv(sub,usub,d)
- add(1)=r12(1)+r13(1)
- add(2)=r12(2)+r13(2)
- add(3)=r12(3)+r13(3)
- call unitv(add,uadd,d)
- call vprod(usub,uadd,side,sintemp,tmp)
- call unitv(side,us,d)
- xh(Ih-1)=x(Iat1)+blength*(uadd(1)*cos(alpha)-us(1)*sin(alpha))
- yh(Ih-1)=y(Iat1)+blength*(uadd(2)*cos(alpha)-us(2)*sin(alpha))
- zh(Ih-1)=z(Iat1)+blength*(uadd(3)*cos(alpha)-us(3)*sin(alpha))
- xh(Ih)=x(Iat1)+blength*(uadd(1)*cos(alpha)+us(1)*sin(alpha))
- yh(Ih)=y(Iat1)+blength*(uadd(2)*cos(alpha)+us(2)*sin(alpha))
- zh(Ih)=z(Iat1)+blength*(uadd(3)*cos(alpha)+us(3)*sin(alpha))
- return
- end
-C------------------------------------------------------------------
- subroutine addthreesp3(x,y,z,xh,yh,zh,Ih,Iat1,Iat2,Iat3)
-C This is based on the GEN routine in VNMR (J. Hoch)
- DIMENSION x(5000),y(5000),z(5000)
- DIMENSION xh(3000),yh(3000),zh(3000),twist(3),utw(3)
- DIMENSION r12(3),u12(3),r23(3),perp(3),side(3),uside(3)
- REAL perp
- blength=1.08
- beta=70.5*3.14159/180. !180-109.5
- cosbeta=cos(beta)
- sinbeta=sin(beta)
- cosgam=0.866 !cos(30)
-c The methyl protons should be staggered to Iat3
- r12(1)=x(Iat1)-x(Iat2)
- r12(2)=y(Iat1)-y(Iat2)
- r12(3)=z(Iat1)-z(Iat2)
- call unitv(r12,u12,d)
- r23(1)=x(Iat2)-x(Iat3)
- r23(2)=y(Iat2)-y(Iat3)
- r23(3)=z(Iat2)-z(Iat3)
- vert=(r12(1)*r23(1)+r12(2)*r23(2)+r12(3)*r23(3))/d
- perp(1)=u12(1)*vert
- perp(2)=u12(2)*vert
- perp(3)=u12(3)*vert
- side(1)=r23(1)-perp(1)
- side(2)=r23(2)-perp(2)
- side(3)=r23(3)-perp(3)
- call unitv(side,uside,d)
- call vprod(u12,uside,twist,sintemp,tmp)
- call unitv(twist,utw,d)
- u12(1)=u12(1)*cosbeta
- u12(2)=u12(2)*cosbeta
- u12(3)=u12(3)*cosbeta
- xh(Ih-2)=x(Iat1)+blength*(u12(1)+uside(1)*sinbeta)
- yh(Ih-2)=y(Iat1)+blength*(u12(2)+uside(2)*sinbeta)
- zh(Ih-2)=z(Iat1)+blength*(u12(3)+uside(3)*sinbeta)
- xh(Ih-1)=x(Iat1)+blength*(u12(1)-sinbeta*(
- & uside(1)/2.0-utw(1)*cosgam))
- yh(Ih-1)=y(Iat1)+blength*(u12(2)-sinbeta*(
- & uside(2)/2.0-utw(2)*cosgam))
- zh(Ih-1)=z(Iat1)+blength*(u12(3)-sinbeta*(
- & uside(3)/2.0-utw(3)*cosgam))
-C NB The /2.0 is actually *sin(30)
- xh(Ih)=x(Iat1)+blength*(u12(1)-sinbeta*(
- & uside(1)/2.0+utw(1)*cosgam))
- yh(Ih)=y(Iat1)+blength*(u12(2)-sinbeta*(
- & uside(2)/2.0+utw(2)*cosgam))
- zh(Ih)=z(Iat1)+blength*(u12(3)-sinbeta*(
- & uside(3)/2.0+utw(3)*cosgam))
- return
- end
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2008,2009,2010,2011,2012,2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2008,2009,2010,2011,2012,2013,2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
};
static gmx_bool bSum = FALSE, bFee = FALSE, bPrAll = FALSE, bFluct = FALSE, bDriftCorr = FALSE;
static gmx_bool bDp = FALSE, bMutot = FALSE, bOrinst = FALSE, bOvec = FALSE, bFluctProps = FALSE;
- static int skip = 0, nmol = 1, nbmin = 5, nbmax = 5;
+ static int nmol = 1, nbmin = 5, nbmax = 5;
static real reftemp = 300.0, ezero = 0;
t_pargs pa[] = {
{ "-fee", FALSE, etBOOL, {&bFee},
"Maximum number of blocks for error estimate" },
{ "-mutot", FALSE, etBOOL, {&bMutot},
"Compute the total dipole moment from the components" },
- { "-skip", FALSE, etINT, {&skip},
- "Skip number of frames between data points" },
{ "-aver", FALSE, etBOOL, {&bPrAll},
"Also print the exact average and rmsd stored in the energy frames (only when 1 term is requested)" },
{ "-nmol", FALSE, etINT, {&nmol},
t_enxframe *frame, *fr = nullptr;
int cur = 0;
#define NEXT (1-cur)
- int nre, teller, nfr;
+ int nre, nfr;
gmx_int64_t start_step;
real start_t;
gmx_bool bDHDL;
snew(edat.s, nset);
/* Initiate counters */
- teller = 0;
bFoundStart = FALSE;
start_step = 0;
start_t = 0;
time[edat.nframes] = fr->t;
edat.nframes++;
}
- /*
- * Printing time, only when we do not want to skip frames
- */
- if (!skip || teller % skip == 0)
+ if (bDHDL)
{
- if (bDHDL)
- {
- do_dhdl(fr, ir, &fp_dhdl, opt2fn("-odh", NFILE, fnm), bDp, &dh_blocks, &dh_hists, &dh_samples, &dh_lambdas, oenv);
- }
+ do_dhdl(fr, ir, &fp_dhdl, opt2fn("-odh", NFILE, fnm), bDp, &dh_blocks, &dh_hists, &dh_samples, &dh_lambdas, oenv);
+ }
- /*******************************************
- * E N E R G I E S
- *******************************************/
- else
+ /*******************************************
+ * E N E R G I E S
+ *******************************************/
+ else
+ {
+ if (fr->nre > 0)
{
- if (fr->nre > 0)
+ if (bPrAll)
+ {
+ /* We skip frames with single points (usually only the first frame),
+ * since they would result in an average plot with outliers.
+ */
+ if (fr->nsum > 1)
+ {
+ print_time(out, fr->t);
+ print1(out, bDp, fr->ener[set[0]].e);
+ print1(out, bDp, fr->ener[set[0]].esum/fr->nsum);
+ print1(out, bDp, std::sqrt(fr->ener[set[0]].eav/fr->nsum));
+ fprintf(out, "\n");
+ }
+ }
+ else
{
- if (bPrAll)
+ print_time(out, fr->t);
+ if (bSum)
{
- /* We skip frames with single points (usually only the first frame),
- * since they would result in an average plot with outliers.
- */
- if (fr->nsum > 1)
+ sum = 0;
+ for (i = 0; i < nset; i++)
{
- print_time(out, fr->t);
- print1(out, bDp, fr->ener[set[0]].e);
- print1(out, bDp, fr->ener[set[0]].esum/fr->nsum);
- print1(out, bDp, std::sqrt(fr->ener[set[0]].eav/fr->nsum));
- fprintf(out, "\n");
+ sum += fr->ener[set[i]].e;
}
+ print1(out, bDp, sum/nmol-ezero);
}
else
{
- print_time(out, fr->t);
- if (bSum)
+ for (i = 0; (i < nset); i++)
{
- sum = 0;
- for (i = 0; i < nset; i++)
+ if (bIsEner[i])
{
- sum += fr->ener[set[i]].e;
+ print1(out, bDp, (fr->ener[set[i]].e)/nmol-ezero);
}
- print1(out, bDp, sum/nmol-ezero);
- }
- else
- {
- for (i = 0; (i < nset); i++)
+ else
{
- if (bIsEner[i])
- {
- print1(out, bDp, (fr->ener[set[i]].e)/nmol-ezero);
- }
- else
- {
- print1(out, bDp, fr->ener[set[i]].e);
- }
+ print1(out, bDp, fr->ener[set[i]].e);
}
}
- fprintf(out, "\n");
}
+ fprintf(out, "\n");
}
}
}
- teller++;
}
}
while (bCont && (timecheck == 0));
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2010, The GROMACS development team.
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2017, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2017, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2017, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2017, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
// but there double precision seems to work fine.
#if defined(__ibmxl__) || defined(__xlC__) || !(defined(__GNUC__) && ((__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 9))))
# define GMX_SIMD_HAVE_DOUBLE 1
-# define GMX_SIMD_HAVE_DINT32 1
# define GMX_SIMD_HAVE_DINT32_EXTRACT 1
# define GMX_SIMD_HAVE_DINT32_LOGICAL 1
# define GMX_SIMD_HAVE_DINT32_ARITHMETICS 1
# define GMX_SIMD_HAVE_GATHER_LOADU_BYSIMDINT_TRANSPOSE_DOUBLE 1
#else
# define GMX_SIMD_HAVE_DOUBLE 0
-# define GMX_SIMD_HAVE_DINT32 0
# define GMX_SIMD_HAVE_DINT32_EXTRACT 0
# define GMX_SIMD_HAVE_DINT32_LOGICAL 0
# define GMX_SIMD_HAVE_DINT32_ARITHMETICS 0
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#define GMX_SIMD_HAVE_STOREU 0
#define GMX_SIMD_HAVE_LOGICAL 0
#define GMX_SIMD_HAVE_FMA 0
-#define GMX_SIMD_HAVE_FRACTION 0
-#define GMX_SIMD_HAVE_FINT32 0
#define GMX_SIMD_HAVE_FINT32_EXTRACT 0
#define GMX_SIMD_HAVE_FINT32_LOGICAL 0
#define GMX_SIMD_HAVE_FINT32_ARITHMETICS 0
-#define GMX_SIMD_HAVE_DINT32 0
#define GMX_SIMD_HAVE_DINT32_EXTRACT 0
#define GMX_SIMD_HAVE_DINT32_LOGICAL 0
#define GMX_SIMD_HAVE_DINT32_ARITHMETICS 0
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#define GMX_SIMD_HAVE_STOREU 0
#define GMX_SIMD_HAVE_LOGICAL 1
#define GMX_SIMD_HAVE_FMA 1
-#define GMX_SIMD_HAVE_FRACTION 0
-#define GMX_SIMD_HAVE_FINT32 1
#define GMX_SIMD_HAVE_FINT32_EXTRACT 1
#define GMX_SIMD_HAVE_FINT32_LOGICAL 1
#define GMX_SIMD_HAVE_FINT32_ARITHMETICS 0
-#define GMX_SIMD_HAVE_DINT32 1
#define GMX_SIMD_HAVE_DINT32_EXTRACT 1
#define GMX_SIMD_HAVE_DINT32_LOGICAL 1
#define GMX_SIMD_HAVE_DINT32_ARITHMETICS 0
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#define GMX_SIMD_HAVE_STOREU 1
#define GMX_SIMD_HAVE_LOGICAL 1
#define GMX_SIMD_HAVE_FMA 1
-#define GMX_SIMD_HAVE_FRACTION 0
-#define GMX_SIMD_HAVE_FINT32 1
#define GMX_SIMD_HAVE_FINT32_EXTRACT 0
#define GMX_SIMD_HAVE_FINT32_LOGICAL 1
#define GMX_SIMD_HAVE_FINT32_ARITHMETICS 1
-#define GMX_SIMD_HAVE_DINT32 1
// Technically it is straightforward to emulate extract on AVX-512 through
// memory operations, but when applied to 16 elements as part of a table lookup
// it will be faster to just store the entire vector once, so we avoid setting it.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#define GMX_SIMD_HAVE_STOREU 1
#define GMX_SIMD_HAVE_LOGICAL 1
#define GMX_SIMD_HAVE_FMA 1
-#define GMX_SIMD_HAVE_FRACTION 0
-#define GMX_SIMD_HAVE_FINT32 1
#define GMX_SIMD_HAVE_FINT32_EXTRACT 0
#define GMX_SIMD_HAVE_FINT32_LOGICAL 1
#define GMX_SIMD_HAVE_FINT32_ARITHMETICS 1
-#define GMX_SIMD_HAVE_DINT32 1
// Technically it is straightforward to emulate extract on AVX-512F through
// memory operations, but when applied to 16 elements as part of a table lookup
// it will be faster to just store the entire vector once, so we avoid setting it.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#define GMX_SIMD_HAVE_STOREU 1
#define GMX_SIMD_HAVE_LOGICAL 1
#define GMX_SIMD_HAVE_FMA 1
-#define GMX_SIMD_HAVE_FRACTION 0
-#define GMX_SIMD_HAVE_FINT32 1
#define GMX_SIMD_HAVE_FINT32_EXTRACT 1
#define GMX_SIMD_HAVE_FINT32_LOGICAL 1
#define GMX_SIMD_HAVE_FINT32_ARITHMETICS 1
-#define GMX_SIMD_HAVE_DINT32 1
#define GMX_SIMD_HAVE_DINT32_EXTRACT 1
#define GMX_SIMD_HAVE_DINT32_LOGICAL 1
#define GMX_SIMD_HAVE_DINT32_ARITHMETICS 1
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
using Base = internal::SimdArrayRef<const SimdFloat>;
using Base::Base;
};
-template<>
-class ArrayRef<SimdFInt32> : public internal::SimdArrayRef<SimdFInt32>
-{
- using Base = internal::SimdArrayRef<SimdFInt32>;
- using Base::Base;
-};
-template<>
-class ArrayRef<const SimdFInt32> : public internal::SimdArrayRef<const SimdFInt32>
-{
- using Base = internal::SimdArrayRef<const SimdFInt32>;
- using Base::Base;
-};
#endif
#if GMX_SIMD_HAVE_DOUBLE
template<>
using Base = internal::SimdArrayRef<const SimdDouble>;
using Base::Base;
};
-template<>
-class ArrayRef<SimdDInt32> : public internal::SimdArrayRef<SimdDInt32>
-{
- using Base = internal::SimdArrayRef<SimdDInt32>;
- using Base::Base;
-};
-template<>
-class ArrayRef<const SimdDInt32> : public internal::SimdArrayRef<const SimdDInt32>
-{
- using Base = internal::SimdArrayRef<const SimdDInt32>;
- using Base::Base;
-};
#endif
} // namespace gmx
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
namespace gmx
{
-namespace
+#if GMX_SIMD_HAVE_REAL
+
+/* SimdInt32 is a strange type which would never belong in an interface,
+ * because its properties are peculiar to int-to-float conversions within
+ * SIMD types, so there is no need to support it as a specialization of
+ * SimdArrayRef. But it is useful here for better test coverage of
+ * SimdArrayRef. */
+
+template<>
+class ArrayRef<SimdInt32> : public internal::SimdArrayRef<SimdInt32>
{
+ using Base = internal::SimdArrayRef<SimdInt32>;
+ using Base::Base;
+};
+template<>
+class ArrayRef<const SimdInt32> : public internal::SimdArrayRef<const SimdInt32>
+{
+ using Base = internal::SimdArrayRef<const SimdInt32>;
+ using Base::Base;
+};
-#if GMX_SIMD_HAVE_REAL
+namespace
+{
TEST(EmptyArrayRefTest, IsEmpty)
{
#endif // GTEST_HAS_TYPED_TEST
-#endif // GMX_HAVE_SIMD_REAL
-
} // namespace
-} // namespace
+#endif // GMX_HAVE_SIMD_REAL
+
+} // namespace gmx
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2013, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
{ "A computer once beat me at chess, but it was no match for me at kick boxing.", "Emo Philips" },
{ "Home computers are being called upon to perform many new functions, including the consumption of homework formerly eaten by the dog.", "Doug Larson" },
{ "Forcefields are like dating; things go fine for a while and then sometimes it goes really bad.", "Alex MacKerell" },
- { "This type of advanced sampling techniques... which are not so advanced, really.", "Viveca Lindahl, on AWH, at her thesis defense." }
+ { "This type of advanced sampling techniques... which are not so advanced, really.", "Viveca Lindahl, on AWH, at her thesis defense." },
+ { "C++ is tricky. You can do everything. You can even make every mistake.", "Nicolai Josuttis, CppCon2017" },
};
if (beCool())
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
/* CAUTION: threads may be started later on in this function, so
cr doesn't reflect the final parallel state right now */
- gmx::MDModules mdModules;
- t_inputrec inputrecInstance;
- t_inputrec *inputrec = &inputrecInstance;
+ std::unique_ptr<gmx::MDModules> mdModules(new gmx::MDModules);
+ t_inputrec inputrecInstance;
+ t_inputrec *inputrec = &inputrecInstance;
snew(mtop, 1);
if (mdrunOptions.continuationOptions.appendFiles)
GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
// TODO: Error handling
- mdModules.assignOptionsToModules(*inputrec->params, nullptr);
+ mdModules->assignOptionsToModules(*inputrec->params, nullptr);
if (fplog != nullptr)
{
{
/* Initiate forcerecord */
fr = mk_forcerec();
- fr->forceProviders = mdModules.initForceProviders();
+ fr->forceProviders = mdModules->initForceProviders();
init_forcerec(fplog, mdlog, fr, fcd,
inputrec, mtop, cr, box,
opt2fn("-table", nfile, fnm),
oenv,
mdrunOptions,
vsite, constr,
- mdModules.outputProvider(),
+ mdModules->outputProvider(),
inputrec, mtop,
fcd,
globalState.get(),
// As soon as we destroy GPU contexts after mdrunner() exits, these lines should go.
mdAtoms.reset(nullptr);
globalState.reset(nullptr);
+ mdModules.reset(nullptr); // destruct force providers here as they might also use the GPU
/* Free GPU memory and set a physical node tMPI barrier (which should eventually go away) */
free_gpu_resources(fr, cr);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2014,2016,2017, by the GROMACS development team, led by
+# Copyright (c) 2014,2016,2017,2018, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+# Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
${CMAKE_SOURCE_DIR}/src/nb_kernel_Elec*.c
${CMAKE_SOURCE_DIR}/src/gromacs/linearalgebra/gmx_blas/*.c
${CMAKE_SOURCE_DIR}/src/gromacs/linearalgebra/gmx_lapack/*.c
- ${CMAKE_SOURCE_DIR}/src/contrib/*.c
- ${CMAKE_SOURCE_DIR}/src/contrib/*.cpp
- ${CMAKE_SOURCE_DIR}/src/contrib/*.cu
${CMAKE_SOURCE_DIR}/src/external/*.c
${CMAKE_SOURCE_DIR}/src/external/*.cpp
${CMAKE_SOURCE_DIR}/src/external/*.cu