Glad it works for you, however it's good practice, and actually more or less required, that you constrain the electrode copy part of the central region when you optimize the device. Even if your approach works, there is a risk that you don't have a precisely crystalline geometry in the electrodes, which introduces additional scattering.
The procedure I do is as follows.
1) First, I contructed a junction with six layers of, for example Au(111), at each side, and a moleucle sandwiched between in (configuration I). 2) And then, copy configuration I for twice. There, I will have three configuaration I.
3) For the first one, I remove the two outermost Au(111) layers at each side to contructed a "extend molecule" consisting a molecule and four Au(111) layers at each side for the following geometric optimizing (configuration II).
4) For the second one, I remove all the atoms except the two lelftmost layers of Au(111) (configuration III).
5) For the third one, I remove all atoms except the two rightmost layers of Au(111) (configuration IV).
6) During the optimization of configuration II, the two leftmost layers of Au(111) will be fixed and the two rightmost layers of Au(111) will set to be rigid. All other atoms will be fully relaxed, the optimized geometry is called configuration II-opt.
7) After the optimization, I will recover the removed two layers of Au(111) at leftmost using "Drop" function by droping configration III on configuaration II-opt, and get configuration V).
8 ) Figure out the tranlation in xyz directions for the two rightmost layer of Au(111) in configuration II-opt with respect to configuration II.
9) Applied the the tranlation got in step ( 8 ) to configuration IV, and get configuration IV-trans.
10) Recover the two rightmost layers of Au(111) by droping configuration IV-trans on configuration II-opt. Then get configuration VI.
At last, I need to use "Device from bulk" to construct a real two probe system based on configuration VI. But, usually it fails due to the destruction of the peridic condition in C direction from a rearrangement of the atoms (I do not know at which step it occurs, maybe during the "Drop" step). In order to make VNL get the periodic condition in C direction, a reorder of the atoms in configuration VI will be needed. But, the "reorder" in "Coordinate List" will only make a sort for one componet. However, "Sort" function will make it.
I think the procedure above will be simple and quick one for constructing a two probe system in VNL, and is there a risk to have a precisely crystalline geometry in the electrodes, that introduces additional scattering?
With best regards,
/Guangping Zhang