return retval;
}
+int
+MoleculeAreAtomsConnected(Molecule *mol, int idx1, int idx2)
+{
+ Atom *ap1 = ATOM_AT_INDEX(mol->atoms, idx1);
+ if (AtomConnectHasEntry(&ap1->connect, idx2))
+ return 1;
+ else if (ap1->anchor != NULL && AtomConnectHasEntry(&(ap1->anchor->connect), idx2))
+ return 2;
+ else return 0;
+}
+
#pragma mark ====== Atom names ======
/* Look for the n1-th atom in resno-th residue (n1 is 0-based) */
return -1; /* Not found */
}
-/*
-int
-MoleculeAreAtomsConnected(Molecule *mp, int n1, int n2)
-{
- Atom *ap;
- Int i, *cp;
- if (mp == NULL || n1 < 0 || n1 >= mp->natoms || n2 < 0 || n2 >= mp->natoms)
- return 0;
- ap = ATOM_AT_INDEX(mp->atoms, n1);
- cp = AtomConnectData(&ap->connect);
- for (i = 0; i < ap->connect.count; i++)
- if (cp[i] == n2)
- return 1;
- return 0;
-}
-*/
-
void
MoleculeGetAtomName(Molecule *mp, int index, char *buf, int bufsize)
{
}
int
-MoleculeAreAtomsConnected(Molecule *mol, int idx1, int idx2)
-{
- Atom *ap1 = ATOM_AT_INDEX(mol->atoms, idx1);
- if (AtomConnectHasEntry(&ap1->connect, idx2))
- return 1;
- else if (ap1->anchor != NULL && AtomConnectHasEntry(&(ap1->anchor->connect), idx2))
- return 2;
- else return 0;
-}
-
-int
MoleculeCheckSanity(Molecule *mol)
{
const char *fail = "Sanity check failure";
int MoleculeMaximumResidueNumber(Molecule *mp, IntGroup *group);
int MoleculeMinimumResidueNumber(Molecule *mp, IntGroup *group);
-int MoleculeAreAtomsConnected(Molecule *mol, int idx1, int idx2);
-
struct MolAction;
#if defined(DEBUG)
int MoleculeCheckSanity(Molecule *mp);
int MoleculeFindCloseAtoms(Molecule *mp, Int index, Double limit, Int *outNbonds, Int **outBonds, Int triangle);
int MoleculeGuessBonds(Molecule *mp, Double limit, Int *outNbonds, Int **outBonds);
-int MoleculeAreAtomsConnected(Molecule *mp, int n1, int n2);
int MoleculeRebuildTablesFromConnects(Molecule *mp);
-
+int MoleculeAreAtomsConnected(Molecule *mol, int idx1, int idx2);
+
void MoleculeGetAtomName(Molecule *mp, int index, char *buf, int bufsize);
void MoleculeSetSelection(Molecule *mp, IntGroup *select);
break;
}
n = (*s - 0x20) % 96; /* Map to 1..95 */
- if (i == 0 && n < 32)
- n = 32;
+ if (i == 0) {
+ if (n < 16) {
+ /* The first character: map !#$%&* to [\]{|}; other characters less than 32 -> _ */
+ static char sTab[] = "_[_\\]{|___}_____";
+ n = sTab[n] - 32;
+ } else if (n < 32) {
+ n = '_' - 32;
+ }
+ }
t += n * s_coeff[i];
}
return t;
return s;
}
for (i = 0; i < 4; i++) {
- s[i] = (type / s_coeff[i]) % 96;
- if (s[i] != 0)
- s[i] += 0x20;
+ n = (type / s_coeff[i]) % 96;
+ if (n != 0) {
+ n += 32;
+ if (n >= '[' && n <= ']')
+ n = "!#$"[n - '['];
+ else if (n >= '{' && n <= '}')
+ n = "%&*"[n - '{'];
+ }
+ s[i] = n;
}
s[4] = 0;
n = strlen(s);
strncpy(a.aname, StringValuePtr(nval), 4);
if (a.aname[0] == '_')
rb_raise(rb_eMolbyError, "please avoid a name beginning with '_' for a pi anchor, because it causes some internal confusion.");
- a.type = AtomTypeEncodeToUInt("an"); /* Default atom type */
+ a.type = AtomTypeEncodeToUInt("##"); /* Default atom type for pi_anchor */
for (i = 0; (n = IntGroupGetNthPoint(ig, i)) >= 0; i++) {
if (n >= mol->natoms) {
AtomConnectResize(&an.connect, 0);
include "gaff.par"
include "parm99.par"
+include "molby.par"
--- /dev/null
+vdw ## 0.0000 0.0000 0.0000 0.0000 0 0.0000 ! Dummy atom for pi-metal bonds
+bond ## ## 0.0000 0.0000 ! Dummy bond
[Files]
Source: "build\Molby\Molby.exe"; DestDir: {app}
Source: "build\Molby\mingwm10.dll"; DestDir: {app}
-Source: "build\Molby\buildInfo.txt"; DestDir: {app}
Source: "build\Molby\amber11\bin\*"; DestDir: {app}\amber11\bin
Source: "build\Molby\amber11\dat\antechamber\*"; DestDir: {app}\amber11\dat\antechamber
Source: "build\Molby\amber11\dat\leap\parm\*"; DestDir: {app}\amber11\dat\leap\parm