Hallo friends i have particular number of nodes in a box. I need to connect all these nodes as a teravalent network. I have no idea how to proceed for this task. Please give me,atleast, idea to proceed.
If you just want to "shake the box" and let atoms connect, then you'll have to use a loop to look through what kinds of atoms you have and connect them by linking nodes.
For example, if one of the nodes identifies itself as a carbon atom, and you can find another four hydrogen atoms, then you can bind them together by linking the carbon node's four links/pointers to a hydrogen node each, and linking each hydrogen node's link/pointer to the carbon node.
Thereafter, examining any one of the linked atoms leads to the entire covalent molecule, and only encountering different atom(s) in the box that could combine for in a more convenient bond would be reason to break up the methane molecule.