Regarding graph theory, I would like to calculate an expression that holds information about positional relationships in three-dimensional space in the invariant.

Asked 2 years ago, Updated 2 years ago, 167 views

This is a question about graph theory.
I would like to think about how to maintain the positional relationship between vertices (nodes) in the variant.

As a concrete example, we consider the molecules of a compound.
Here, the atoms in the molecule (the vertices in the graph) and
The three-dimensional coordinates (three-dimensional vectors) of each atom are given.
You can use these three-dimensional coordinates to calculate the distance between vertices (the length of the sides in the graph) and so on.

Here, when viewed from a_i an atom in a compound (the i-th atom),
The positional relationship of other atoms a_j, a_k, a_m... in three-dimensional space
I'd like to think of ways and expressions to keep it invariant for operations such as rotation.

For example, if you calculate the distance between atoms using the given three-dimensional coordinates,
I can express the distance relationship between other atoms as seen from a_i, but
This will result in the loss of location relationship information in three-dimensional space.

I think that the set of all triangles made using a_i and any other two atoms a_j and a_k is
We thought that the positional relationship of other atoms in the three-dimensional space from the perspective of a_i would be kept invariant.
That is,
not the distance d_ij between the two atoms. If the distance between the three atoms (d_ij, d_ik, d_jk) = triangle,
It means that we can maintain positional relationships in three-dimensional space.
(Of course, we distinguish and define triangles by taking into account the types of atoms that are vertices of triangles.)

Then calculate this triangle for all atoms a_i.

However, I don't know if this is correct.
In particular,
for program implementation
mirror isomers must be distinguished (invariant to rotation). I'm a little unsure.

Who will teach you?

Add

In order to do this, we would like to use a data structure that preserves some properties to show the positional relationship of atoms, and then use machine learning to predict the toxicity of compounds.Machine learning is a functional approximation after all, so data that essentially has the same meaning must be given the same input.However, if you enter the coordinates as they are, data with essentially the same meaning (atomic positional relationships) will be entered as different data, so there is a sense of problem.

algorithm data-structure mathematics graph-theory

2022-09-30 21:27

1 Answers

"Even if the questioner implements the logic he is thinking about now, he may not be able to solve the problem of a combination of n! in ""Which coordinates correspond to which coordinates correspond to which coordinates"" (maybe it's just that he doesn't understand...")

And since I couldn't come up with a good general solution, I'll write down my policy of doing this myself.

I understand that what I want to do now is whether or not a set of three-dimensional coordinates is given and rotated to match.

First: Consider relative coordinates from the center of gravity

We want a reference point, so we calculate the mean (center of gravity) of each set of coordinates and calculate the relative position of each coordinate.You can now determine if this set of relative coordinates matches the rotation coordinate transformation.

Determine coordinate rotation

If you leave it as it is, it will be difficult, so I will try to decide based on the characteristic value of the target.Perhaps this is what the invariant for the questioner's rotation means.

For example, if the coordinate set (compound) of the object is straight-chain and the position of the coordinate (atomic) farthest from the center of gravity is uniquely determined, isn't it?If you have any of these characteristics, you can use them.

and consider the type of atom, but do you know the characteristic atoms of the compound?(For example: only one particular atom is used)

If you look at the coordinate set as a whole, you can't tell the characteristic points, but if you think about the coordinate set of specific types of atoms, wouldn't it be easier to understand the characteristic points?

If you know the conditions of the compound you want to determine, calculate two feature points considering the above points.Two feature points allow you to determine coordinate rotation in three dimensions along with the center of gravity.

Determine identity after rotation

The coordinates are floating-point, real data, so there will be no exact match, and I think there will always be an error.So, compare the distances while finding the corresponding coordinates using the logic below.

For tolerance e, separate the coordinates of the compound with a lattice of e and prepare an associative array (Hash) of {3D coordinate->corresponding coordinate candidate array}.

For one of the compounds to be compared, do the following:

 For the grid corresponding to each coordinate a_i:
  For the lattice itself and its adjacent lattice 3*3*3=27, respectively,
  Add a_i to Hash [grid] <a_i#Hash

For the other compound:

 For the grid corresponding to each coordinate a_j:
  For the lattice itself and the adjacent lattice 3*3*3=27,
  From the a_i coordinates in Hash,
  A coordinate a_i closest to a_j is found.

Then find the distance between a_i and a_j, and if it is less than or equal to the error e, the coordinates are considered to be consistent.If you take the sum of the distances of all the corresponding coordinates, you can use that as an indication of how much the coordinate sets match.

Actually

In particular, it may be necessary to make trial and error about the accuracy of rotation.If so, fine-tune several times to run the above matching algorithm to find a rotation that reduces the sum of the distances.If the sum of the distances is less than a certain amount, it should be considered a match, but I think we have to find out what this value is through trial and error.


2022-09-30 21:27

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.