Actually not, and I guess this is what ghostanime refers to:localghost wrote:Isn't this exactly what chemfig does?ghostanime2001 wrote:[…] How do I set the bond length to be the same length for example 1cm? […]
In my eyes chemfig's behaviour most times is a good thing, though.chemfig manual wrote:Rather than speaking of length of a bond, we should use the term interatomic spacing. If effect, only the interatomic spacing is adjustable with\setatomsep
as we have seen on page 11. Once this parameter is set, the length of a bond depends on the content of atoms and, to a lesser extent, the angle the bond makes with the horizontal. It should be obvious that two “slimmer” atoms will have larger edge separations than two which are larger. This can be seen easily in the following example where an “I” atom is narrower than an “M” atom, which means that the bond between the “I” atoms is longer than that between the “M” atoms.
@ghostanime: you need to specify the
node distance
property, see 16.5.3 Advanced Placement Options of the 
Code: Select all
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\def\bondlength{7mm}
\begin{tikzpicture}[node distance=\bondlength]
\node (a) {C};
\node (b) [above=of a] {H};
\node (c) [below=of a] {H};
\node (d) [left=of a] {H};
\node (e) [right=of a] {C};
\node (f) [below right=\bondlength of e] {O};
\node (g) [right=of f] {H};
\node at (a.north east) {+};
\draw (a.north) to (b.south);
\draw (a.south) to (c.north);
\draw (d.east) to (a.west);
\draw (e.west) to (a.east);
\draw (f.north west) to (e.south east);
\draw (f.east) to (g.west);
\end{tikzpicture}
\end{document}