Hi there, I'd like to lead off by thanking everyone for creating such a great software toolkit. It has been very valuable in my research!
I noticed that 'obrotate' was giving me some unexpected behavior for some molecules when I apply it to rotate certain bonds in 'babel'-generated XYZ files. Here are two examples and an interpretation: --- Example 1 --- babel -ismi example1.smi -oxyz example1.xyz --gen3D obrotate "CC(=O)N[C@@H]([C@H](C)CC)C(=O)NC" example1.xyz 4 5 12 14 100 (example1.smi contains the same string that is passed to obrotate.) This gives the following error: obrotate: The torsional atom values must be between 1 and 13, which is the number of atoms in the SMART pattern. However, the following command (using different atom numbers) gives the correct behavior: obrotate "CC(=O)N[C@@H]([C@H](C)CC)C(=O)NC" example1.xyz 4 5 10 12 -100 If we view the xyz file, the actual atoms that I intended to rotate are numbers "4 5 12 14" (as in the first line), not "4 5 10 12" (as in the second line). --- Example 2 --- babel -ismi example2.smi -oxyz example2.xyz --gen3D obrotate "c1cccnc1C(=O)N(C)C" example2.xyz 8 7 9 10 100.0 If we view the xyz file, we find a dihedral angle of 100.0 degrees for atoms "8 7 9 11" although the requested atoms are "8 7 9 10". --- Interpretation --- I believe that 'obrotate' is determining the atom numbers from the SMART pattern, and this becomes a problem when the atom numbers in 'obrotate' don't match the atom numbers from the XYZ generated by babel. In the first example (isoleucine), there are two explicit hydrogens that obrotate is not counting. In the second example, there are two identical CH3 groups; 'obrotate' will rotate the second one even though I explicitly specified the first one. I am able to work around this manually by trial and error and 'guessing' which atom numbers are requested by 'obrotate', but I think it would be much more straightforward if the atom numbers could be taken from the XYZ file and not determined from the SMART pattern. If the atom numbers must be determined from the SMART pattern, then it should be done in a manner consistent with the numbering scheme in 'babel'. Thanks! Lee-Ping Wang Simbios Postdoctoral Fellow, Pande and Martinez Groups Stanford University Dept. of Chemistry --- BEGIN example1.xyz --- 31 Isoleucine_Dipeptide C 5.88915 -3.93784 2.34531 C 5.38486 -2.58279 1.93189 O 5.33046 -1.62954 2.70307 N 5.01054 -2.50473 0.61225 C 4.44388 -1.27505 0.04626 H 4.88040 -0.40788 0.55826 C 4.73713 -1.18148 -1.47404 H 4.23616 -2.01602 -1.98331 C 6.24597 -1.30944 -1.74245 C 4.19788 0.14487 -2.05884 C 4.31832 0.23583 -3.57534 C 2.93038 -1.32547 0.36853 O 2.07628 -1.65946 -0.44904 N 2.64151 -1.04780 1.69058 C 1.30319 -1.07061 2.22001 H 5.36512 -4.73201 1.80579 H 5.71290 -4.07948 3.41519 H 6.96061 -4.00251 2.13904 H 4.81065 -3.36678 0.11967 H 6.46168 -1.31915 -2.81493 H 6.65055 -2.24283 -1.33825 H 6.79776 -0.47801 -1.29059 H 3.13872 0.26383 -1.80650 H 4.72280 0.99511 -1.60614 H 3.87137 -0.63856 -4.05883 H 5.36172 0.31494 -3.89362 H 3.79765 1.12721 -3.94015 H 3.42284 -0.88148 2.32582 H 0.64659 -1.69646 1.61098 H 0.92294 -0.04604 2.23535 H 1.34255 -1.45882 3.24054 --- END example1.xyz --- --- BEGIN example2.xyz --- 21 N_N_dimethylamido_2_pyridine C 0.08124 0.46173 -1.02456 C 1.38074 0.38933 -0.53028 C 1.63841 0.81653 0.76668 C 0.58103 1.29609 1.52254 N -0.69008 1.38211 1.07303 C -0.92090 0.97355 -0.20323 C -2.32750 1.01607 -0.73511 O -2.61924 0.21640 -1.62734 N -3.25972 1.93779 -0.23872 C -2.96153 2.97310 0.73821 C -4.65347 1.79941 -0.62278 H -0.14717 0.12301 -2.03067 H 2.18122 -0.00275 -1.15141 H 2.63937 0.77098 1.18166 H 0.73456 1.63396 2.54399 H -1.97293 3.40261 0.56041 H -3.01898 2.54115 1.74134 H -3.69453 3.78183 0.65439 H -4.80794 1.00673 -1.35908 H -4.99780 2.74609 -1.05063 H -5.24123 1.56805 0.27076 --- END example2.xyz --- ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss