Molecule.C File Reference

#include "largefiles.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "InfoStream.h"
#include "Molecule.h"
#include "strlib.h"
#include "MStream.h"
#include "Communicate.h"
#include "Node.h"
#include "ObjectArena.h"
#include "Parameters.h"
#include "PDB.h"
#include "SimParameters.h"
#include "Hydrogen.h"
#include "UniqueSetIter.h"
#include "charm++.h"
#include "ComputeGridForce.h"
#include "GridForceGrid.h"
#include "MGridforceParams.h"
#include "Debug.h"
#include "CompressPsf.h"
#include "ParallelIOMgr.h"
#include <deque>
#include <algorithm>

Go to the source code of this file.

Defines

#define MIN_DEBUG_LEVEL   3
#define GROMACS_PAIR   1
#define GROMACS_EXCLUSIONS   1

Functions

int getLCPOTypeAmber (char atomType[11], int numBonds)
int getLCPOTypeCharmm (char atomType[11], int numBonds)

Define Documentation

#define GROMACS_EXCLUSIONS   1

Definition at line 64 of file Molecule.C.

#define GROMACS_PAIR   1

Definition at line 60 of file Molecule.C.

#define MIN_DEBUG_LEVEL   3

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 46 of file Molecule.C.


Function Documentation

int getLCPOTypeAmber ( char  atomType[11],
int  numBonds 
) [inline]

Definition at line 2640 of file Molecule.C.

02640                                                              {
02641 
02642   //Hydrogen
02643   if (atomType[0] == 'H' || atomType[0] == 'h') {
02644     return 0;
02645 
02646   //Carbon
02647   } else if (atomType[0] == 'C' || atomType[0] == 'c') {
02648     if (//Sp3 Carbon
02649       //atomType[1] == 'T')// ||
02650       strcmp(atomType, "CT" )==0 )
02651       //strcmp(atomType, "CP1" )==0 ||
02652       //strcmp(atomType, "CP2" )==0 ||
02653       //strcmp(atomType, "CP3" )==0 ||
02654       //strcmp(atomType, "CS"  )==0 )
02655       {
02656       if (numBonds == 1)
02657         return 1;
02658       else if (numBonds == 2)
02659         return 2;
02660       else if (numBonds == 3)
02661         return 3;
02662       else if (numBonds == 4)
02663         return 4;
02664       else
02665         return 1;
02666 
02667     } else {//Sp2 or other
02668       if (numBonds == 2)
02669         return 5;
02670       else if (numBonds == 3)
02671         return 6;
02672       else
02673         return 1;
02674     }
02675 
02676   //Nitrogen
02677   } else if (atomType[0] == 'N' || atomType[0] == 'n') {
02678     if ( strcmp(atomType, "N3"  ) == 0 ) { //Sp3 Nitrogen
02679       if (numBonds == 1)
02680         return 11;
02681       else if (numBonds == 2)
02682         return 12;
02683       else if (numBonds == 3)
02684         return 13;
02685       else
02686         return 11;
02687 
02688     } else {//SP2 Nitrogen
02689       if (numBonds == 1)
02690         return 14;
02691       else if (numBonds == 2)
02692         return 15;
02693       else if (numBonds == 3)
02694         return 16;
02695       else
02696         return 11;
02697     }
02698 
02699   //Oxygen
02700   } else if (atomType[0] == 'O' || atomType[0] == 'o') {
02701 
02702     if ( strcmp(atomType, "O" )==0) {//Sp2 Oxygen
02703       return 9;
02704     } else if (strcmp(atomType, "O2" )==0) {//Carboxylate Oxygen
02705       return 10;
02706     } else { // Sp3 Oxygen
02707       if (numBonds == 1)
02708         return 7;
02709       else if (numBonds == 2)
02710         return 8;
02711       else
02712         return 7;
02713     }
02714 
02715   //Sulfur
02716   } else if (atomType[0] == 'S' || atomType[0] == 's') {
02717     if ( strcmp(atomType, "SH" )==0) { //Sulfur 1 neighbor
02718       return 17;
02719     } else {
02720       return 18;
02721     }
02722 
02723   //Phosphorus
02724   } else if (atomType[0] == 'P' || atomType[0] == 'p') {
02725       if (numBonds == 3)
02726         return 19;
02727       else if (numBonds == 4)
02728         return 20;
02729       else
02730         return 19;
02731   } else if (atomType[0] == 'Z') { // ? just to agree with Amber mdread.f
02732     return 0;
02733   } else  if ( strcmp(atomType, "MG" )==0) { //Mg
02734     return 22;
02735   } else { // unknown atom type
02736     return 5;
02737   }
02738   return 5;
02739 } // getLCPOTypeAmber

int getLCPOTypeCharmm ( char  atomType[11],
int  numBonds 
) [inline]

Definition at line 2741 of file Molecule.C.

02741                                                               {
02742 
02743   //Hydrogen
02744   if (atomType[0] == 'H') {
02745     return 0;
02746 
02747   //Carbon
02748   } else if (atomType[0] == 'C') {
02749     if (//Sp3 Carbon
02750       atomType[1] == 'T' ||
02751       strcmp(atomType, "CP1" )==0 ||
02752       strcmp(atomType, "CP2" )==0 ||
02753       strcmp(atomType, "CP3" )==0 ||
02754       strcmp(atomType, "CS"  )==0 ) {
02755       if (numBonds == 1)
02756         return 1;
02757       else if (numBonds == 2)
02758         return 2;
02759       else if (numBonds == 3)
02760         return 3;
02761       else if (numBonds == 4)
02762         return 4;
02763       else
02764         return 1;
02765 
02766     } else if (//Sp2
02767       strcmp(atomType, "C"   )==0 ||
02768       strcmp(atomType, "CA"  )==0 ||
02769       strcmp(atomType, "CC"  )==0 ||
02770       strcmp(atomType, "CD"  )==0 ||
02771       strcmp(atomType, "CN"  )==0 ||
02772       strcmp(atomType, "CY"  )==0 ||
02773       strcmp(atomType, "C3"  )==0 ||
02774       strcmp(atomType, "CE1" )==0 ||
02775       strcmp(atomType, "CE2" )==0 ||
02776       strcmp(atomType, "CST" )==0 ||
02777       strcmp(atomType, "CAP" )==0 ||
02778       strcmp(atomType, "COA" )==0 ||
02779       strcmp(atomType, "CPT" )==0 ||
02780       strcmp(atomType, "CPH1")==0 ||
02781       strcmp(atomType, "CPH2")==0
02782       ) {
02783       if (numBonds == 2)
02784         return 5;
02785       else if (numBonds == 3)
02786         return 6;
02787       else
02788         return 1;
02789     } else { // other Carbon
02790         return 1;
02791     }
02792 
02793   //Nitrogen
02794   } else if (atomType[0] == 'N') {
02795     if (//Sp3 Nitrogen
02796       //strcmp(atomType, "N"   )==0 ||
02797       //strcmp(atomType, "NH1" )==0 ||
02798       //strcmp(atomType, "NH2" )==0 ||
02799       strcmp(atomType, "NH3" )==0 ||
02800       //strcmp(atomType, "NC2" )==0 ||
02801       //strcmp(atomType, "NY"  )==0 ||
02802       strcmp(atomType, "NP"  )==0
02803       ) {
02804       if (numBonds == 1)
02805         return 11;
02806       else if (numBonds == 2)
02807         return 12;
02808       else if (numBonds == 3)
02809         return 13;
02810       else
02811         return 11;
02812 
02813     } else if (//SP2 Nitrogen
02814       strcmp(atomType, "NY"  )==0 || //
02815       strcmp(atomType, "NC2" )==0 || //
02816       strcmp(atomType, "N"   )==0 || //
02817       strcmp(atomType, "NH1" )==0 || //
02818       strcmp(atomType, "NH2" )==0 || //
02819       strcmp(atomType, "NR1" )==0 ||
02820       strcmp(atomType, "NR2" )==0 ||
02821       strcmp(atomType, "NR3" )==0 ||
02822       strcmp(atomType, "NPH" )==0 ||
02823       strcmp(atomType, "NC"  )==0
02824       ) {
02825       if (numBonds == 1)
02826         return 14;
02827       else if (numBonds == 2)
02828         return 15;
02829       else if (numBonds == 3)
02830         return 16;
02831       else
02832         return 11;
02833     } else { // other Nitrogen
02834       return 11;
02835     }
02836 
02837   //Oxygen
02838   } else if (atomType[0] == 'O') {
02839     if (//Sp3 Oxygen
02840       strcmp(atomType, "OH1" )==0 ||
02841       strcmp(atomType, "OS"  )==0 ||
02842       strcmp(atomType, "OC"  )==0 || //
02843       strcmp(atomType, "OT"  )==0
02844       ) {
02845       if (numBonds == 1)
02846         return 7;
02847       else if (numBonds == 2)
02848         return 8;
02849       else
02850         return 7;
02851     } else if ( // Sp2 Oxygen
02852       strcmp(atomType, "O"   )==0 ||
02853       strcmp(atomType, "OB"  )==0 ||
02854       strcmp(atomType, "OST" )==0 ||
02855       strcmp(atomType, "OCA" )==0 ||
02856       strcmp(atomType, "OM"  )==0
02857       ) {
02858       return 9;
02859     } else if ( // SP1 Oxygen
02860       strcmp(atomType, "OC"  )==0
02861       ) {
02862       return 10;
02863     } else { // other Oxygen
02864       return 7;
02865     }
02866 
02867   //Sulfur
02868   } else if (atomType[0] == 'S') {
02869       if (numBonds == 1)
02870         return 17;
02871       else
02872         return 18;
02873 
02874   //Phosphorus
02875   } else if (atomType[0] == 'P') {
02876       if (numBonds == 3)
02877         return 19;
02878       else if (numBonds == 4)
02879         return 20;
02880       else
02881         return 19;
02882   } else { // unknown atom type
02883     return 5;
02884   }
02885   return 5;
02886 } // getLCPOTypeCharmm


Generated on 19 Sep 2020 for NAMD by  doxygen 1.6.1