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 2375 of file Molecule.C.

02375                                                              {
02376 
02377   //Hydrogen
02378   if (atomType[0] == 'H' || atomType[0] == 'h') {
02379     return 0;
02380 
02381   //Carbon
02382   } else if (atomType[0] == 'C' || atomType[0] == 'c') {
02383     if (//Sp3 Carbon
02384       //atomType[1] == 'T')// ||
02385       strcmp(atomType, "CT" )==0 )
02386       //strcmp(atomType, "CP1" )==0 ||
02387       //strcmp(atomType, "CP2" )==0 ||
02388       //strcmp(atomType, "CP3" )==0 ||
02389       //strcmp(atomType, "CS"  )==0 )
02390       {
02391       if (numBonds == 1)
02392         return 1;
02393       else if (numBonds == 2)
02394         return 2;
02395       else if (numBonds == 3)
02396         return 3;
02397       else if (numBonds == 4)
02398         return 4;
02399       else
02400         return 1;
02401 
02402     } else {//Sp2 or other
02403       if (numBonds == 2)
02404         return 5;
02405       else if (numBonds == 3)
02406         return 6;
02407       else
02408         return 1;
02409     }
02410 
02411   //Nitrogen
02412   } else if (atomType[0] == 'N' || atomType[0] == 'n') {
02413     if ( strcmp(atomType, "N3"  ) == 0 ) { //Sp3 Nitrogen
02414       if (numBonds == 1)
02415         return 11;
02416       else if (numBonds == 2)
02417         return 12;
02418       else if (numBonds == 3)
02419         return 13;
02420       else
02421         return 11;
02422 
02423     } else {//SP2 Nitrogen
02424       if (numBonds == 1)
02425         return 14;
02426       else if (numBonds == 2)
02427         return 15;
02428       else if (numBonds == 3)
02429         return 16;
02430       else
02431         return 11;
02432     }
02433 
02434   //Oxygen
02435   } else if (atomType[0] == 'O' || atomType[0] == 'o') {
02436 
02437     if ( strcmp(atomType, "O" )==0) {//Sp2 Oxygen
02438       return 9;
02439     } else if (strcmp(atomType, "O2" )==0) {//Carboxylate Oxygen
02440       return 10;
02441     } else { // Sp3 Oxygen
02442       if (numBonds == 1)
02443         return 7;
02444       else if (numBonds == 2)
02445         return 8;
02446       else
02447         return 7;
02448     }
02449 
02450   //Sulfur
02451   } else if (atomType[0] == 'S' || atomType[0] == 's') {
02452     if ( strcmp(atomType, "SH" )==0) { //Sulfur 1 neighbor
02453       return 17;
02454     } else {
02455       return 18;
02456     }
02457 
02458   //Phosphorus
02459   } else if (atomType[0] == 'P' || atomType[0] == 'p') {
02460       if (numBonds == 3)
02461         return 19;
02462       else if (numBonds == 4)
02463         return 20;
02464       else
02465         return 19;
02466   } else if (atomType[0] == 'Z') { // ? just to agree with Amber mdread.f
02467     return 0;
02468   } else  if ( strcmp(atomType, "MG" )==0) { //Mg
02469     return 22;
02470   } else { // unknown atom type
02471     return 5;
02472   }
02473   return 5;
02474 } // getLCPOTypeAmber

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

Definition at line 2476 of file Molecule.C.

02476                                                               {
02477 
02478   //Hydrogen
02479   if (atomType[0] == 'H') {
02480     return 0;
02481 
02482   //Carbon
02483   } else if (atomType[0] == 'C') {
02484     if (//Sp3 Carbon
02485       atomType[1] == 'T' ||
02486       strcmp(atomType, "CP1" )==0 ||
02487       strcmp(atomType, "CP2" )==0 ||
02488       strcmp(atomType, "CP3" )==0 ||
02489       strcmp(atomType, "CS"  )==0 ) {
02490       if (numBonds == 1)
02491         return 1;
02492       else if (numBonds == 2)
02493         return 2;
02494       else if (numBonds == 3)
02495         return 3;
02496       else if (numBonds == 4)
02497         return 4;
02498       else
02499         return 1;
02500 
02501     } else if (//Sp2
02502       strcmp(atomType, "C"   )==0 ||
02503       strcmp(atomType, "CA"  )==0 ||
02504       strcmp(atomType, "CC"  )==0 ||
02505       strcmp(atomType, "CD"  )==0 ||
02506       strcmp(atomType, "CN"  )==0 ||
02507       strcmp(atomType, "CY"  )==0 ||
02508       strcmp(atomType, "C3"  )==0 ||
02509       strcmp(atomType, "CE1" )==0 ||
02510       strcmp(atomType, "CE2" )==0 ||
02511       strcmp(atomType, "CST" )==0 ||
02512       strcmp(atomType, "CAP" )==0 ||
02513       strcmp(atomType, "COA" )==0 ||
02514       strcmp(atomType, "CPT" )==0 ||
02515       strcmp(atomType, "CPH1")==0 ||
02516       strcmp(atomType, "CPH2")==0
02517       ) {
02518       if (numBonds == 2)
02519         return 5;
02520       else if (numBonds == 3)
02521         return 6;
02522       else
02523         return 1;
02524     } else { // other Carbon
02525         return 1;
02526     }
02527 
02528   //Nitrogen
02529   } else if (atomType[0] == 'N') {
02530     if (//Sp3 Nitrogen
02531       //strcmp(atomType, "N"   )==0 ||
02532       //strcmp(atomType, "NH1" )==0 ||
02533       //strcmp(atomType, "NH2" )==0 ||
02534       strcmp(atomType, "NH3" )==0 ||
02535       //strcmp(atomType, "NC2" )==0 ||
02536       //strcmp(atomType, "NY"  )==0 ||
02537       strcmp(atomType, "NP"  )==0
02538       ) {
02539       if (numBonds == 1)
02540         return 11;
02541       else if (numBonds == 2)
02542         return 12;
02543       else if (numBonds == 3)
02544         return 13;
02545       else
02546         return 11;
02547 
02548     } else if (//SP2 Nitrogen
02549       strcmp(atomType, "NY"  )==0 || //
02550       strcmp(atomType, "NC2" )==0 || //
02551       strcmp(atomType, "N"   )==0 || //
02552       strcmp(atomType, "NH1" )==0 || //
02553       strcmp(atomType, "NH2" )==0 || //
02554       strcmp(atomType, "NR1" )==0 ||
02555       strcmp(atomType, "NR2" )==0 ||
02556       strcmp(atomType, "NR3" )==0 ||
02557       strcmp(atomType, "NPH" )==0 ||
02558       strcmp(atomType, "NC"  )==0
02559       ) {
02560       if (numBonds == 1)
02561         return 14;
02562       else if (numBonds == 2)
02563         return 15;
02564       else if (numBonds == 3)
02565         return 16;
02566       else
02567         return 11;
02568     } else { // other Nitrogen
02569       return 11;
02570     }
02571 
02572   //Oxygen
02573   } else if (atomType[0] == 'O') {
02574     if (//Sp3 Oxygen
02575       strcmp(atomType, "OH1" )==0 ||
02576       strcmp(atomType, "OS"  )==0 ||
02577       strcmp(atomType, "OC"  )==0 || //
02578       strcmp(atomType, "OT"  )==0
02579       ) {
02580       if (numBonds == 1)
02581         return 7;
02582       else if (numBonds == 2)
02583         return 8;
02584       else
02585         return 7;
02586     } else if ( // Sp2 Oxygen
02587       strcmp(atomType, "O"   )==0 ||
02588       strcmp(atomType, "OB"  )==0 ||
02589       strcmp(atomType, "OST" )==0 ||
02590       strcmp(atomType, "OCA" )==0 ||
02591       strcmp(atomType, "OM"  )==0
02592       ) {
02593       return 9;
02594     } else if ( // SP1 Oxygen
02595       strcmp(atomType, "OC"  )==0
02596       ) {
02597       return 10;
02598     } else { // other Oxygen
02599       return 7;
02600     }
02601 
02602   //Sulfur
02603   } else if (atomType[0] == 'S') {
02604       if (numBonds == 1)
02605         return 17;
02606       else
02607         return 18;
02608 
02609   //Phosphorus
02610   } else if (atomType[0] == 'P') {
02611       if (numBonds == 3)
02612         return 19;
02613       else if (numBonds == 4)
02614         return 20;
02615       else
02616         return 19;
02617   } else { // unknown atom type
02618     return 5;
02619   }
02620   return 5;
02621 } // getLCPOTypeCharmm


Generated on Thu Sep 21 01:17:15 2017 for NAMD by  doxygen 1.4.7