# how to setup continued fraction

Hi transiesta users and developers,

I read the recent Computer Physics Communication paper about the new version of transiesta, and found that the "continued fraction" method for equilibrium Green function integration is implemented in transiesta. I am trying to test this option, since we only need one parameter in this case: the number of poles. In my test I used the following for the equilibrium contour:

TS.Contours.Eq.Pole -2.5 eV

TS.Contours.

The results make no sense, because the number of charges on each atom is negative. So there must be something wrong with my setup. Could you please give an example for using the "continued fraction" option?

Thank your very much.

Yun-Peng Wang

## Question information

- Language:
- English Edit question

- Status:
- Solved

- For:
- Siesta Edit question

- Assignee:
- No assignee Edit question

- Solved by:
- Yunpeng Wang

- Solved:
- 2016-12-18

- Last query:
- 2016-12-18

- Last reply:

Yunpeng Wang (ypwang) said : | #1 |

A follow up: when I increase the number of poles to 55, the results make sense.

Nick Papior (nickpapior) said : | #2 |

Exactly, the continued fraction method is (as the other methods) very

sensible to the number of points.

Also please try with the standard method for an equal amount of contour

points.

Also know that 4.1 does not enable force calculations with the continued

fraction method.

On 18 Dec 2016 17:32, "Yunpeng Wang" <email address hidden>

wrote:

> Question #407573 on Siesta changed:

> https:/

>

> Status: Open => Solved

>

> Yunpeng Wang confirmed that the question is solved:

> A follow up: when I increase the number of poles to 55, the results make

> sense.

>

> --

> You received this question notification because you are an answer

> contact for Siesta.

>

Yunpeng Wang (ypwang) said : | #3 |

As for the standard method using circle contour: because the standard contour consists of two parts, so there is a freedom to set the number of points for each part, given the total number of points. Another degree of freedom is the number of poles. I have some questions about the standard approach:

1. Is there any rule of thumb for setting the number of points for the circle and tail part, as well as the number of poles?

2. Are the numbers of points in the circle part and in the tail part independent of each other, if I want to test the convergence of total energy with respect to the number of points?

3. From the examples, I read that the standard approach uses "circle" and "tail" to form the contour. From the recent transiesta paper, I know that the "square" keywords is used for a rectangular contour. But what the "line" keyword is used for?

Sorry for so many questions. Thank you very much!

Yun-Peng Wang

Nick Papior (nickpapior) said : | #4 |

1. The number of points are very dependent on the temperature.

The larger the temperature, typically the fewer points you need. The default values of the 4.1 transiesta version

are a reasonable compromise between performance and accuracy, and will in most cases be more than enough.

As with any other quantity you may do a convergence test of the variables.

2. The circle part and tail part are dependent numbers, but for large temperatures it makes sense to primarily converge the tail part. Then subsequently you may check if adding more on the circle changes anything.

3. The line part is if you want to put a line in between the circle and the tail part.

The circle starts the contour, then you may add any number of line-contours to change the shape of the contour, but lastly you *must* put a tail contour to terminate the Fermi-function.

Lastly, the line part is used for tbtrans for integration in a large range of energy values.

Yunpeng Wang (ypwang) said : | #5 |

Thank you very much for this detailed explanation.