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

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

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

Definition at line 2539 of file Molecule.C.

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


Generated on Sun Nov 19 01:17:16 2017 for NAMD by  doxygen 1.4.7