Re: [chem] more on bonds and arrows
"G. Branden Robinson" <[email protected]>
| Newsgroups | gmane.comp.printing.groff.general |
|---|---|
| Message-ID | <20251207075346.4n2vt55rwv6ezn6p@illithid> |
Hi Norwid,
At 2025-11-12T19:38:49+0100, Norwid Behrnd wrote:
> While browsing though the examples of `chem` Linux Debian provides in
> path `/usr/share/doc/groff-base/examples/chem`, I noticed a chemical
> error in file `ATP.chem`, i.e., a missing nitrogen atom.
Well, _that's_ not good...
> This lead to an observation of maybe a second one.
>
> Given Hans' preliminary modifications of `chem` as shared in his email
> by September 27th, I used the archived he included for a gradual
> correction / modification of `ATP.chem` in question. To best of my
> knowledge, the new bond types proposed were not yet added to the
> commit history of groff. This is the reason why this email includes a
> .zip archive the most relevant files to ease a replication by Hans and
> other volunteers interested.
Correct, nothing along those lines has been committed yet. When there
is consensus regarding a code change to groff, two good procedures for
people who aren't already committers are (1) mail this list with a
"[PATCH]" annotation in the subject line; or (2) file a Savannah ticket.
https://savannah.gnu.org/bugs/?group=groff
Sometimes a patch proposal is a good idea even for people who _are_
committers; observe
https://lists.gnu.org/archive/html/groff/2025-11/msg00003.html
...for example.
> Revisions `atp_r03.chem` and above build on Hans' work (->
> `Chem.pdf`), hence can not be rendered by the current original `chem`
> preprocessor (-> `ChemO.pdf`).
>
> @Hans, and interested volunteers: Contrary to the examples compiled by
> Hans, I observe the proposed new bond types `wedge` and `rwedge` work
> will within a plain cycle, e.g. `ring5` in code block `atp_r03.chem:`.
> They however appear to be incompatible with an additional explicit
> definition of a non-C atom (`put O at 1`, block `atp_r04.chem:`
> because `chem` now interprets them to belong to keyword `double`.
>
> This might represent a bug in Hans' proposition, separate from the
> missing nitrogen atom in `ATP.chem` (last commit by 11 Novembre 2020).
The foregoing sounds like solid peer review of Hans's proposal. We
don't want to catch only mere typos, but design errors.
> @Branden: My preference is to address the bond issue in `ATP.chem`
> first,
I agree. However, the ZIP file you attached appears to contain only
additional ATP molecule examples, not a patch, properly considered, to
the existing one.
I propose the following minimal correction of the existing file:
$ git diff
diff --git a/contrib/chem/examples/atp.chem b/contrib/chem/examples/atp.chem
index 738c4da3c..d36c5175d 100644
--- a/contrib/chem/examples/atp.chem
+++ b/contrib/chem/examples/atp.chem
@@ -25,8 +25,11 @@ atp.chem:
# The GPL2 license text is available in the internet at
# <http://www.gnu.org/licenses/gpl-2.0.html>.
-R1: ring5 pointing left double 1,2 3,4 put N at 2 put N at 5
-B: benzene put N at 2 with .V6 at R1.V3 with .V5 at R1.V4
+# corrected missing nitrogen atom, Norwid Behrnd 2025-11-11
+
+R1: ring5 pointing left double 1,2 put N at 2 put N at 5
+B: benzene put N at 2 put N at 4 double 1,2 3,4 5,6 \
+ with .V6 at R1.V3 with .V5 at R1.V4
bond up ; NH2
backbond 170 length .7 from R1.V5
R2: ring5 pointing down with .V2 put O at 1
I reduced the change to not omit the "Thiele ring". I am unfamiliar
with this term and the English Wikipedia is no help; I assume you refer
to what my limited education calls a "benzene ring".
I attach screenshots of the PostScript generated by the unpatched and
patched files. To my minimally trained eye your corrected version
looks, uh, topologically equivalent to Wikipedia's info box for ATP.
But please correct me if I am mistaken.
> subsequently consider filing a PR with a revised `ATP.chem` to the git
> history of groff.
More or less. We don't use a GitHub/GitLab-style system, so our "pull
requests" are either Savannah tickets or emails to this list, as noted
above.
Thanks for giving your attention to this under-appreciated component of
groff!
Regards,
Branden
atp.ps
(application/postscript, 9.3 KB) - not displayed
atp-fixed.ps
(application/postscript, 9.4 KB) - not displayed
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmk1MooACgkQ0Z6cfXEm bc5Wrw//Y5B4W7+jGnh96XA1FCO4yNcD95HCNrVQCkHD8xDcnTWVIplCWfeQPoGR rAppnHRqbSmoJqgZbJf0EvsFMQOtiavkhNRoCWu4ZDvZeqFOaO/CmZdjAIP73f7p MrIbwUxC0vu3NkPFBgy/c4MJbVFgD0Vggnoibe6lU69IqBIdxMyfZ1B/ImOyvLp7 O0iQhZ7FKE2Znicp9D6SbidJjs7LVOFPwkAwK4NBzLfQAULUNtx/Egcl6y8BJ54v nmhksWBBKqWSm25A1Xqf7A3ZcrtFLxixD51Hr2qgBQMVkNXyaQQxaIhZoq0W8otC aSbGUARdm4wj13QsdNrX4zyf5+KMxGAKd9OrfudoiUS4GCYW1xBg/KTu5NiOpbIS 1iVkFoaiKLiQq3T1rVyojA2+xPxwVpsCgFiYv2v04j0+zsRMDcnPmZ1Wv4sLm6Yd xXmJfxD5W5B1tgeyhfQuMZPOrE8g33xjagmjU6hrWIDnoAlOG/N319Pjs6WlGC6F mff+2JcVbj+rq2Zse8CMEdjVANpp5hR1dSzDNm9feIOm3Pudqf4GzWERdsWnYczK PpMNk5KPRKWLyGG/NAYNzNGsw8ZHH9OPguDOEfY4Pm7hsBa/cngQ0HwiIeUmowM/ IidL5dsTifV5K7k4n+mU77orHPN3BPrMV6GkbMBQRmBz4X5fdxQ= =M5ea -----END PGP SIGNATURE-----