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

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

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

Definition at line 2572 of file Molecule.C.

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


Generated on 20 Sep 2019 for NAMD by  doxygen 1.6.1