Tried to implement fixing atoms as part of a conformational search.... as a straightforward modification of the 'obconformer' tool.... but perhaps I'm missing something. I'm using the source from openbabel-2.2.3
I simply added this (in the "while(ifs.peek() != EOF && ifs.good())" loop): OBFFConstraints constraints; int i = 0; for (i=1; i<=3; i++) { cout << " Fixing atom index " << i << "...\n"; OBAtom *atom; atom = mol.GetAtom(i); if (!atom->IsHydrogen()) { constraints.AddAtomConstraint(i); } else { cerr << "Error! heavy atoms first !" << endl; } } pFF->Setup(mol,constraints); pFF->WeightedRotorSearch(weightSteps, geomSteps); ... etc as in "tools/obconfomer.cpp" and removed the old "pFF->Setup(mol);" statement I tried this on a simple butane molecule (defined in a pdb), where the first atoms listed are the carbon backbone, in linear order. I'd expect this to "freeze" the first 3 carbon atoms, however, in the output only 2 of the 4 carbon atoms are held in fixed position. (The first and the last carbons moved.) Trying this approach to freeze all 4 of the carbon atoms, results in a conformer where only 1 of the carbon atoms have moved. (The first carbon moved.) Anyone able to shed some light on this for me? What am I missing? ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss