[brahms-md] r55 committed - Fixed bug that was messing up the bonded topology

0 views
Skip to first unread message

brah...@googlecode.com

unread,
Aug 20, 2011, 8:30:44 AM8/20/11
to brahms-d...@googlegroups.com
Revision: 55
Author: orsimario
Date: Sat Aug 20 05:29:45 2011
Log: Fixed bug that was messing up the bonded topology
http://code.google.com/p/brahms-md/source/detail?r=55

Modified:
/trunk/src/lammps.c

=======================================
--- /trunk/src/lammps.c Thu Aug 18 10:23:37 2011
+++ /trunk/src/lammps.c Sat Aug 20 05:29:45 2011
@@ -96,22 +96,17 @@
fprintf(fp, "Bonds\n\n");
bondCount = 0;
DO_SITE {
- id = n + 1 + (site[n].inLipid - 1); // conversion to LAMMPS atom-ID
+ id = n + 1; // conversion to LAMMPS atom-ID
switch ( site[ n ].lipidUnit ) {
case WATER: /* break - nonlipid site */
case TAIL_A5: // break - this case is considered in TAIL_A4
case TAIL_B5: // break - this case is considered in TAIL_B4
break;
case CHOLINE_OR_AMINE: /* choline***phosphate (DOPC) or
amine***phosphate (DOPE) */
- if (site[n].type == CHOLINE_TYPE) { /* choline***phosphate (DOPC) */
- atom1 = id;
- atom2 = atom1 + 1;
- fprintf(fp, "%7d%5d%8d%8d\n", ++bondCount, CHOL_PHOS, atom1, atom2 );
- } else { /* amine***phosphate (DOPE) */
- atom1 = id;
- atom2 = atom1 + 1;
- fprintf(fp, "%7d%5d%8d%8d\n", ++bondCount, AMINE_PHOS, atom1, atom2 );
- }
+ if (site[n].type == CHOLINE_TYPE) /* choline***phosphate (DOPC) */
+ fprintf(fp, "%7d%5d%8d%8d\n", ++bondCount, CHOL_PHOS, id, id+1 );
+ else /* amine***phosphate (DOPE) */
+ fprintf(fp, "%7d%5d%8d%8d\n", ++bondCount, AMINE_PHOS, id, id+1 );
break;
case PHOSPHATE: // phosphate***glycerol
atom1 = id; // phos
@@ -164,7 +159,7 @@
fprintf(fp, "Angles\n\n");
angleCount = 0;
DO_SITE {
- id = n + (site[n].inLipid - 1); // conversion to LAMMPS atom-ID
+ id = n; // conversion to LAMMPS atom-ID
switch ( site[ n ].lipidUnit ) { /* identify the site "n"
corresponding to the angle "(n-1)--(n)--(n+1)" */
case WATER:
case CHOLINE_OR_AMINE:

Reply all
Reply to author
Forward
0 new messages