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 M_PI   3.14159265358979323846
#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 M_PI   3.14159265358979323846

Definition at line 56 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 2451 of file Molecule.C.

02451                                                              {
02452 
02453   //Hydrogen
02454   if (atomType[0] == 'H' || atomType[0] == 'h') {
02455     return 0;
02456 
02457   //Carbon
02458   } else if (atomType[0] == 'C' || atomType[0] == 'c') {
02459     if (//Sp3 Carbon
02460       //atomType[1] == 'T')// ||
02461       strcmp(atomType, "CT" )==0 )
02462       //strcmp(atomType, "CP1" )==0 ||
02463       //strcmp(atomType, "CP2" )==0 ||
02464       //strcmp(atomType, "CP3" )==0 ||
02465       //strcmp(atomType, "CS"  )==0 )
02466       {
02467       if (numBonds == 1)
02468         return 1;
02469       else if (numBonds == 2)
02470         return 2;
02471       else if (numBonds == 3)
02472         return 3;
02473       else if (numBonds == 4)
02474         return 4;
02475       else
02476         return 1;
02477 
02478     } else {//Sp2 or other
02479       if (numBonds == 2)
02480         return 5;
02481       else if (numBonds == 3)
02482         return 6;
02483       else
02484         return 1;
02485     }
02486 
02487   //Nitrogen
02488   } else if (atomType[0] == 'N' || atomType[0] == 'n') {
02489     if ( strcmp(atomType, "N3"  ) == 0 ) { //Sp3 Nitrogen
02490       if (numBonds == 1)
02491         return 11;
02492       else if (numBonds == 2)
02493         return 12;
02494       else if (numBonds == 3)
02495         return 13;
02496       else
02497         return 11;
02498 
02499     } else {//SP2 Nitrogen
02500       if (numBonds == 1)
02501         return 14;
02502       else if (numBonds == 2)
02503         return 15;
02504       else if (numBonds == 3)
02505         return 16;
02506       else
02507         return 11;
02508     }
02509 
02510   //Oxygen
02511   } else if (atomType[0] == 'O' || atomType[0] == 'o') {
02512 
02513     if ( strcmp(atomType, "O" )==0) {//Sp2 Oxygen
02514       return 9;
02515     } else if (strcmp(atomType, "O2" )==0) {//Carboxylate Oxygen
02516       return 10;
02517     } else { // Sp3 Oxygen
02518       if (numBonds == 1)
02519         return 7;
02520       else if (numBonds == 2)
02521         return 8;
02522       else
02523         return 7;
02524     }
02525 
02526   //Sulfur
02527   } else if (atomType[0] == 'S' || atomType[0] == 's') {
02528     if ( strcmp(atomType, "SH" )==0) { //Sulfur 1 neighbor
02529       return 17;
02530     } else {
02531       return 18;
02532     }
02533 
02534   //Phosphorus
02535   } else if (atomType[0] == 'P' || atomType[0] == 'p') {
02536       if (numBonds == 3)
02537         return 19;
02538       else if (numBonds == 4)
02539         return 20;
02540       else
02541         return 19;
02542   } else if (atomType[0] == 'Z') { // ? just to agree with Amber mdread.f
02543     return 0;
02544   } else  if ( strcmp(atomType, "MG" )==0) { //Mg
02545     return 22;
02546   } else { // unknown atom type
02547     return 5;
02548   }
02549   return 5;
02550 } // getLCPOTypeAmber

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

Definition at line 2552 of file Molecule.C.

02552                                                               {
02553 
02554   //Hydrogen
02555   if (atomType[0] == 'H') {
02556     return 0;
02557 
02558   //Carbon
02559   } else if (atomType[0] == 'C') {
02560     if (//Sp3 Carbon
02561       atomType[1] == 'T' ||
02562       strcmp(atomType, "CP1" )==0 ||
02563       strcmp(atomType, "CP2" )==0 ||
02564       strcmp(atomType, "CP3" )==0 ||
02565       strcmp(atomType, "CS"  )==0 ) {
02566       if (numBonds == 1)
02567         return 1;
02568       else if (numBonds == 2)
02569         return 2;
02570       else if (numBonds == 3)
02571         return 3;
02572       else if (numBonds == 4)
02573         return 4;
02574       else
02575         return 1;
02576 
02577     } else if (//Sp2
02578       strcmp(atomType, "C"   )==0 ||
02579       strcmp(atomType, "CA"  )==0 ||
02580       strcmp(atomType, "CC"  )==0 ||
02581       strcmp(atomType, "CD"  )==0 ||
02582       strcmp(atomType, "CN"  )==0 ||
02583       strcmp(atomType, "CY"  )==0 ||
02584       strcmp(atomType, "C3"  )==0 ||
02585       strcmp(atomType, "CE1" )==0 ||
02586       strcmp(atomType, "CE2" )==0 ||
02587       strcmp(atomType, "CST" )==0 ||
02588       strcmp(atomType, "CAP" )==0 ||
02589       strcmp(atomType, "COA" )==0 ||
02590       strcmp(atomType, "CPT" )==0 ||
02591       strcmp(atomType, "CPH1")==0 ||
02592       strcmp(atomType, "CPH2")==0
02593       ) {
02594       if (numBonds == 2)
02595         return 5;
02596       else if (numBonds == 3)
02597         return 6;
02598       else
02599         return 1;
02600     } else { // other Carbon
02601         return 1;
02602     }
02603 
02604   //Nitrogen
02605   } else if (atomType[0] == 'N') {
02606     if (//Sp3 Nitrogen
02607       //strcmp(atomType, "N"   )==0 ||
02608       //strcmp(atomType, "NH1" )==0 ||
02609       //strcmp(atomType, "NH2" )==0 ||
02610       strcmp(atomType, "NH3" )==0 ||
02611       //strcmp(atomType, "NC2" )==0 ||
02612       //strcmp(atomType, "NY"  )==0 ||
02613       strcmp(atomType, "NP"  )==0
02614       ) {
02615       if (numBonds == 1)
02616         return 11;
02617       else if (numBonds == 2)
02618         return 12;
02619       else if (numBonds == 3)
02620         return 13;
02621       else
02622         return 11;
02623 
02624     } else if (//SP2 Nitrogen
02625       strcmp(atomType, "NY"  )==0 || //
02626       strcmp(atomType, "NC2" )==0 || //
02627       strcmp(atomType, "N"   )==0 || //
02628       strcmp(atomType, "NH1" )==0 || //
02629       strcmp(atomType, "NH2" )==0 || //
02630       strcmp(atomType, "NR1" )==0 ||
02631       strcmp(atomType, "NR2" )==0 ||
02632       strcmp(atomType, "NR3" )==0 ||
02633       strcmp(atomType, "NPH" )==0 ||
02634       strcmp(atomType, "NC"  )==0
02635       ) {
02636       if (numBonds == 1)
02637         return 14;
02638       else if (numBonds == 2)
02639         return 15;
02640       else if (numBonds == 3)
02641         return 16;
02642       else
02643         return 11;
02644     } else { // other Nitrogen
02645       return 11;
02646     }
02647 
02648   //Oxygen
02649   } else if (atomType[0] == 'O') {
02650     if (//Sp3 Oxygen
02651       strcmp(atomType, "OH1" )==0 ||
02652       strcmp(atomType, "OS"  )==0 ||
02653       strcmp(atomType, "OC"  )==0 || //
02654       strcmp(atomType, "OT"  )==0
02655       ) {
02656       if (numBonds == 1)
02657         return 7;
02658       else if (numBonds == 2)
02659         return 8;
02660       else
02661         return 7;
02662     } else if ( // Sp2 Oxygen
02663       strcmp(atomType, "O"   )==0 ||
02664       strcmp(atomType, "OB"  )==0 ||
02665       strcmp(atomType, "OST" )==0 ||
02666       strcmp(atomType, "OCA" )==0 ||
02667       strcmp(atomType, "OM"  )==0
02668       ) {
02669       return 9;
02670     } else if ( // SP1 Oxygen
02671       strcmp(atomType, "OC"  )==0
02672       ) {
02673       return 10;
02674     } else { // other Oxygen
02675       return 7;
02676     }
02677 
02678   //Sulfur
02679   } else if (atomType[0] == 'S') {
02680       if (numBonds == 1)
02681         return 17;
02682       else
02683         return 18;
02684 
02685   //Phosphorus
02686   } else if (atomType[0] == 'P') {
02687       if (numBonds == 3)
02688         return 19;
02689       else if (numBonds == 4)
02690         return 20;
02691       else
02692         return 19;
02693   } else { // unknown atom type
02694     return 5;
02695   }
02696   return 5;
02697 } // getLCPOTypeCharmm


Generated on Fri May 25 01:17:16 2018 for NAMD by  doxygen 1.4.7