Crystal structure representation method, computer device and storage medium
By reducing the dimensionality of the atomic positions in the crystal structure and generating a low-dimensional continuous vector representation, the problem of poor crystal structure representation in traditional methods is solved, the efficiency of crystal structure search and modeling is improved, and the geometric similarity and symmetry of the crystal structure are retained.
Patent Information
- Application Number
- CN202510857185.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-25
AI Technical Summary
Traditional crystal structure representation methods lack the description of the internal structural information of the crystal, which makes it difficult to perform direct comparison, modeling and search in machine learning, especially for irregular structures. In addition, high-dimensional discrete structure representation has problems with computational efficiency and symmetry preservation.
By obtaining the initial representation file of the crystal structure, extracting the initial spatial positions of atoms, determining neighboring atoms and their distances, and using these distances to perform dimensionality reduction, a low-dimensional continuous vector representation is generated, retaining the geometric similarity and symmetry of the crystal structure.
It achieves low-dimensional mapping of high-dimensional spatial positions, maintains the geometric similarity and symmetry of the crystal structure, breaks through the limitations of traditional methods in structure search, performance modeling and computational efficiency, and improves the efficiency of material information and intelligent research.
Smart Images

Figure CN120376001B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computational materials technology, and in particular to a method for representing crystal structures, a computer device, and a storage medium. Background Art
[0002] With the advent of the concept of materials genetic engineering, machine learning has gradually been integrated into materials science research. Using machine learning, researchers can delve into materials' band structures, charge distribution, stability, and various physical and chemical properties at the atomic scale, providing solid theoretical support for the design of new materials and the prediction of their performance.
[0003] For example, carbon materials, due to their rich structural forms and unique physical and chemical properties, have shown broad application prospects in energy storage, electronic devices, catalysis, and biomedicine. For carbon crystal structures, such as graphite, diamond-like carbon, porous carbon, carbon nanotubes, fullerenes, etc., their atomic arrangements are highly complex and diverse. By training the structural and property data of carbon crystal structures, it is possible to model the structure-performance relationship, predict material properties, and perform reverse design. However, this method places high demands on the representation of carbon crystal structures. It requires input features that can accurately express the essence of the carbon crystal structure and facilitate the understanding and processing of machine learning algorithms.
[0004] However, the traditional method of representing crystal structure is based on lattice and atomic coordinates. Although it can describe all the geometric information of the crystal structure, it lacks the structural information inside the crystal, which is not conducive to direct comparison, modeling and search between crystal structures. Summary of the Invention
[0005] The present application provides a method for representing a crystal structure, a computer device, and a storage medium to at least solve the problem of poor performance in representing the crystal structure.
[0006] The present application provides a method for representing a crystal structure, comprising: obtaining an initial representation file of the crystal structure, extracting the initial spatial position of each atom in the initial representation file; using the initial spatial position of each atom, determining the neighboring atoms corresponding to each atom, and the atomic pair distances between each atom and its neighboring atoms; performing dimensionality reduction processing on each initial spatial position using each atomic pair distance to obtain a target spatial position corresponding to each atom and its neighboring atoms; and representing the crystal structure using each target spatial position to generate a target representation of the crystal structure.
[0007] The present application also provides a computer device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned crystal structure representation methods when executing the computer program.
[0008] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for representing a crystal structure are implemented.
[0009] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned crystal structure representation methods when executed by a processor.
[0010] Through the crystal structure representation method of the present application, the initial spatial position of each atom extracted from the initial representation file is used to determine the neighboring atoms corresponding to each atom, and then the atomic pair distances between each atom and its neighboring atoms are determined; the initial spatial position of each atom is reduced in dimension using the atomic pair distances, and the target spatial position of each atom can be obtained, so that the target spatial position of each atom can be used to represent the crystal structure and generate a target representation of the crystal structure. The present application reduces the dimension of the initial spatial position of each atom by the atomic pair distances between each atom and its neighboring atoms, which can not only map the high-dimensional initial spatial position to a low-dimensional, continuous and comparable vector representation, but also retain the geometric similarity and symmetry between crystal structures, thereby solving the problem of poor representation of the crystal structure, and further breaking through the limitations of traditional high-dimensional discrete structure representation in structure search, performance modeling and computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0012] Figure 1 A schematic diagram of a method for representing a crystal structure provided in an embodiment of the present application;
[0013] Figure 2 A schematic diagram of another method for representing a crystal structure provided in an embodiment of the present application;
[0014] Figure 3 A schematic diagram of another method for representing a crystal structure provided in an embodiment of the present application;
[0015] Figure 4 A schematic diagram of a target representation of a crystal structure generated based on manifold learning provided in an embodiment of the present application;
[0016] Figure 5 The embodiment of the present application provides a method for representing a carbon crystal structure using a carbon crystal structure as an example and based on manifold learning;
[0017] Figure 6 A schematic structural diagram of a device for representing a crystal structure provided in an embodiment of the present application;
[0018] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0020] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0021] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0022] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the crystal structure representation method depends, the specific application environment architecture or specific hardware architecture is described herein.
[0023] With the advent of the concept of materials genetic engineering, machine learning has gradually been integrated into materials science research. Using machine learning, researchers can delve into materials' band structures, charge distribution, stability, and various physical and chemical properties at the atomic scale, providing solid theoretical support for the design of new materials and the prediction of their performance.
[0024] For example, carbon materials, due to their rich structural forms and unique physical and chemical properties, have shown broad application prospects in energy storage, electronic devices, catalysis, and biomedicine. For carbon crystal structures, such as graphite, diamond-like carbon, porous carbon, carbon nanotubes, fullerenes, etc., their atomic arrangements are highly complex and diverse. By training the structural and property data of carbon crystal structures, it is possible to model the structure-performance relationship, predict material properties, and perform reverse design. However, this method places high demands on the representation of carbon crystal structures. It requires input features that can accurately express the essence of the carbon crystal structure and facilitate the understanding and processing of machine learning algorithms.
[0025] However, traditional crystal structure representation methods are based on lattice and atomic coordinates. While they can describe the full geometric information of a crystal structure, they lack internal structural information, hindering direct comparison, modeling, and search between crystal structures. This is particularly problematic for intelligent modeling tasks such as machine learning, hindering the further development of information-based and intelligent materials research. In recent years, deep learning techniques such as graph neural networks (GNNs), autoencoders, variational autoencoders (VAEs), diffusion models, and the Transformer (a deep learning architecture) have been gradually introduced into material structure modeling tasks, achieving significant progress in compound generation, property prediction, and structure search. However, most crystal structure representation methods rely on graph structures, which lacks good geometric interpretability and performs poorly for irregular structures such as amorphous and porous structures. Among them, crystal structure representation methods based on graph neural networks model the crystal structure as a graph, with atoms as nodes and interatomic interactions as edges, and then automatically extract structural features using graph neural networks. This approach effectively captures both local and global atomic environment information, but it still has some limitations. For example, graph neural networks are limited in their ability to process long-range interactions (such as van der Waals forces or charge transfer), often only capturing structural features within a local neighborhood. Furthermore, symmetry information between different structures is difficult to directly preserve or express, which can lead to inaccurate predictions of physical properties sensitive to crystal symmetry. Furthermore, graph neural networks are sensitive to data quality and training scale, resulting in high training costs and poor interpretability.
[0026] In view of this, the present application proposes a method for representing a crystal structure, a computer device, and a storage medium. The method comprises: obtaining an initial representation file of the crystal structure and extracting the initial spatial position of each atom in the initial representation file; based on the initial spatial position of each atom, determining the neighboring atoms corresponding to each atom and the atomic pair distances between each atom and its neighboring atoms; performing dimensionality reduction processing on each initial spatial position using each atomic pair distance to obtain a target spatial position corresponding to each atom; and representing the crystal structure using each target spatial position to generate a target representation of the crystal structure.
[0027] The crystal structure representation method of the present application utilizes the initial spatial position of each atom extracted from the initial representation file to determine the neighboring atoms corresponding to each atom, and then determines the atomic pair distances between each atom and its neighboring atoms; utilizing each atomic pair distance, the initial spatial position of each atom is subjected to dimensionality reduction processing, and the target spatial position of each atom can be obtained, thereby being able to utilize the target spatial position of each atom to represent the crystal structure and generate a target representation of the crystal structure. The present application reduces the dimensionality of the initial spatial position of each atom by the atomic pair distances between each atom and its neighboring atoms, which not only maps the high-dimensional initial spatial position to a low-dimensional, continuous and comparable vector representation, but also retains the geometric similarity and symmetry between crystal structures, thereby solving the problem of poor representation of the crystal structure, and further, breaking through the limitations of traditional high-dimensional discrete structure representation in structure search, performance modeling and computational efficiency.
[0028] In this embodiment, a method for representing a crystal structure is provided, which can be used in servers, personal computers, cloud platforms, etc. Figure 1 is a flow chart of a method for representing a crystal structure according to an embodiment of the present application, such as Figure 1 As shown, the process includes the following steps.
[0029] Step S101: obtaining an initial representation file of the crystal structure and extracting the initial spatial position of each atom in the initial representation file.
[0030] The initial crystal structure representation file can be a standardized record file of the crystal structure. As a specific example, the initial representation file can be in a CIF (Crystallographic Information File), POSCAR, or XYZ format. Alternatively, the initial crystal structure representation file can be directly input into a computer device, so that the computer device can obtain the initial crystal structure representation file.
[0031] The initial spatial position of each atom can be a three-dimensional spatial coordinate or a spatial coordinate of another dimension, and this application does not limit this. As a specific example, the process of extracting the three-dimensional spatial coordinates of each atom in the initial representation file can be: parsing the file format of the initial representation file to obtain the target file format of the initial representation file; obtaining the preset extraction strategy corresponding to the target file format; and using the preset extraction strategy to extract the three-dimensional spatial coordinates of each atom from the initial representation file. For example, if the target file format is POSCAR, the first part of the initial representation file is generally 3 3, the second part is the three-dimensional spatial coordinates of each atom. In this case, the preset extraction strategy can be to extract the data information after the unit cell parameter matrix to obtain the three-dimensional spatial coordinates of each atom. For another example, if the target file format is CIF, the first part of the initial representation file is generally to correspond the unit cell parameter names to the specific values of the unit cell parameters, and the second part is the three-dimensional spatial coordinates of each atom. In this case, the preset extraction strategy can be to extract the unit cell parameter names from the specific values of the unit cell parameters to obtain the three-dimensional spatial coordinates of each atom.
[0032] As a specific example, the crystal structure may be a carbon crystal structure or other crystal structures, and this application does not limit this.
[0033] Step S102 : using the initial spatial position of each atom, determining the neighboring atoms corresponding to each atom, and the atomic pair distances between each atom and its neighboring atoms.
[0034] The neighboring atoms of each atom may be determined by using a distance threshold method, a coordination environment method, a polyhedron method, or a triangulation method, and this application does not impose any restrictions thereto.
[0035] Atom pair distances can be the distances between an atom and its neighboring atoms. The atom pair distances between each atom and its neighboring atoms can be directly calculated from the initial spatial positions of each atom and its neighboring atoms. Alternatively, the initial spatial positions of each atom and its neighboring atoms can be processed before calculating the atom pair distances.
[0036] Step S103 , performing dimensionality reduction processing on each initial spatial position using the distances of each atom pair to obtain the target spatial position corresponding to each atom and its neighboring atoms.
[0037] In the process of performing dimensionality reduction processing on each initial spatial position, the goal is to minimize the difference between the atomic pair distances of each atom and its neighboring atoms in the low-dimensional space and the atomic pair distances in the high-dimensional space. The dimensionality reduction processing is performed on each initial spatial position to obtain the target spatial position of each atom and its neighboring atoms in the low-dimensional space. For example, if the initial spatial position is 3-dimensional, the dimensionality reduction processing can reduce the initial spatial position to 2-dimensional, convert each atom and its neighboring atoms into 2-dimensional space, and obtain the target spatial position of each atom and its neighboring atoms in the 2-dimensional space.
[0038] Here, by performing dimensionality reduction processing on the initial spatial position, the data structure complexity of each atom can be reduced, and the distance relationship between each atom and its neighboring atoms in the original space can be maintained as much as possible.
[0039] Step S104 : representing the crystal structure using each target spatial position to generate a target representation of the crystal structure.
[0040] The target representation is used to describe the composition of the crystal structure. Specifically, the basic repeating unit of the crystal structure is the unit cell. The side lengths and angles of the unit cell define the space group of the crystal structure, and the atoms within the unit cell occupy specific positions to form lattice points. Once the target spatial positions of each atom and its neighboring atoms are determined, the positions of each lattice point are determined. Therefore, multiple unit cells can be generated according to the positions occupied by each target spatial position. Then, the crystal structure can be described by combining the side lengths and angles of each unit cell to obtain the target representation used to describe the crystal structure.
[0041] As a specific example, each target spatial position can also be input into the target structure file to form a target representation of the crystal structure. Of course, each target spatial position can also be used to represent the crystal structure as follows: Figure 4 In this way, by representing the crystal structure at each target spatial position, a unified low-dimensional, continuous, comparable, and inputtable representation of the crystal structure can be obtained, which facilitates the subsequent use of the target representation of the crystal structure for applications such as indexing and retrieval of material databases, structural classification and clustering, supervised / self-supervised modeling, generating model input spaces, material recommendation, and optimized design.
[0042] The method for representing the crystal structure provided in this embodiment uses the initial spatial position of each atom extracted from the initial representation file to determine the neighboring atoms corresponding to each atom, and then determines the atomic pair distance between each atom and its neighboring atoms; using each atomic pair distance, the initial spatial position of each atom is subjected to dimensionality reduction processing, and the target spatial position of each atom can be obtained, so that the target spatial position of each atom can be used to represent the crystal structure and generate a target representation of the crystal structure. The present application reduces the dimensionality of the initial spatial position of each atom by the atomic pair distance between each atom and its neighboring atoms, which can not only map the high-dimensional initial spatial position to a low-dimensional, continuous and comparable vector representation, but also retain the geometric similarity and symmetry between crystal structures, thereby solving the problem of poor representation of the crystal structure, and further breaking through the limitations of traditional high-dimensional discrete structure representation in structure search, performance modeling and computational efficiency.
[0043] In this embodiment, a method for representing a crystal structure is provided, which can be used in servers, personal computers, cloud platforms, etc. Figure 2 is a flow chart of a method for representing a crystal structure according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps.
[0044] Step S201 : obtaining an initial representation file of the crystal structure, and extracting the initial spatial position of each atom in the initial representation file.
[0045] Specifically, the above step S201 includes:
[0046] Step S2011, obtain the initial representation file of the crystal structure. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0047] Step S2012: Obtain the atomic arrangement type of the crystal structure.
[0048] The atomic arrangement type can be the periodic arrangement of atoms (or ions, or molecules) in a crystal in three-dimensional space. As a specific example, the atomic arrangement type of a crystal structure can be determined based on the file format of the initial representation file. Alternatively, the atomic arrangement type can be determined based on the crystal structure itself. For example, periodic crystal structures include graphite, carbon nanotubes, and diamond; non-periodic crystal structures include carbon clusters, diamond-like carbon, porous carbon, and fullerenes.
[0049] Step S2013: If the atomic arrangement type is a periodic type, the coordinates of each atom extracted from the initial representation file are determined as the initial spatial position of each atom.
[0050] Periodicity is the property of atoms (or ions, or molecules) in a crystal to repeat infinitely in a fixed pattern in three-dimensional space. This smallest unit of repetition is called a unit cell, and the entire crystal structure can be tiled by translating the unit cell in space. If the crystal structure itself exhibits periodicity, the coordinates of each atom extracted from the initial representation file can be directly determined as their initial spatial position. The unit cell parameters can then be extracted from the initial representation file for coordinate transformation or cell expansion. Specifically, the unit cell parameters may include lattice constants and lattice angles.
[0051] Step S2014: If the atomic arrangement type is a non-periodic type, coordinate transformation is performed on the coordinates of each atom extracted from the initial representation file to obtain the initial spatial position of each atom.
[0052] Aperiodicity can be defined as the lack of long-range, ordered, repeating patterns in the arrangement of atoms or molecules in three-dimensional space. This means that there is no unit cell that can be extended indefinitely, and the unit cell parameters cannot be relied upon to position atoms. Therefore, for non-periodic crystal structures, the geometric center of all atoms—the center of mass of all atomic coordinates—must be calculated and used as the new coordinate origin. The positions of all atoms are then translated so that the crystal structure is represented with the geometric center as the origin. This not only facilitates consistency comparisons between crystal structures but also improves the accuracy of the target representation of the resulting crystal structure.
[0053] In some optional implementations, the above step S2014 includes:
[0054] In step a1, the center of mass is determined using the coordinates of each atom extracted from the initial representation file.
[0055] Step a2: Using the center of mass as the coordinate origin, the coordinates of each atom are translated to obtain the initial spatial position of each atom.
[0056] The center of mass is the geometric center of an atom. Combining the atomic shape and coordinates, the center of mass can be calculated directly, using integration methods, or by finite element analysis to simulate the atomic mass distribution. Computer-aided design (CAD) can also be used to automatically calculate and display the center of mass. There are no specific restrictions on how the center of mass is determined.
[0057] The center of mass can be determined more accurately through the coordinates of each atom, and then the coordinates of each atom are translated with the center of mass as the coordinate origin, so that the crystal structure can be represented with the geometric center as the origin. This not only helps to compare the consistency between crystal structures, but also improves the accuracy of the target representation of the final generated crystal structure.
[0058] Step S202 : using the initial spatial position of each atom, determining the neighboring atoms corresponding to each atom, and the atomic pair distances between each atom and its neighboring atoms.
[0059] Specifically, the above step S202 includes:
[0060] In step S2021 , for any target atom among the atoms, a preset distance is expanded outward with the target atom as the center to obtain a target area.
[0061] Among them, the preset distance can be flexibly set according to actual needs, and this application does not limit this.
[0062] As a specific example, a circular target region can be determined with the target atom as the center and a preset distance as the radius. Since the circular target region can ensure that the radius is the same in all directions, the target region can be used to more accurately determine the neighboring atoms of each atom.
[0063] Step S2022: determine the atoms in the target region as neighboring atoms of the target atom.
[0064] The number of atoms in the target region can be one or more, and thus the target atom can have one or more neighboring atoms. Using the target region to determine the neighboring atoms of each atom can more accurately determine the neighboring atoms of each atom. In other words, the same atom can be treated in a cell expansion manner. That is, the same atom originally in different unit cells will be treated as different atoms in the same "large lattice" after cell expansion, thereby avoiding the influence of the periodic boundary conditions of the crystal structure, which may result in multiple atomic pair distances between two atoms.
[0065] By constructing a preset area to determine the neighboring atoms of each atom, the neighboring atoms of each atom can be determined more accurately, and subsequently the atomic pair distances between each atom and its neighboring atoms can be determined more accurately, further improving the accuracy of the determined target spatial position of each atom.
[0066] Specifically, the above step 202 further includes:
[0067] Step S2023 , performing symmetry transformation processing on the initial spatial positions of each atom and its neighboring atoms to obtain candidate spatial positions of each atom and its neighboring atoms.
[0068] As a specific example, a rotation, reflection, or inversion operation can be used to perform a symmetry transformation on the initial spatial positions of each atom and its neighboring atoms to obtain candidate spatial positions for each atom and its neighboring atoms. Performing a symmetry transformation on the initial spatial positions of each atom and its neighboring atoms can convert the physical symmetries of the crystal into mathematical constraints, allowing the target representation of the crystal structure to accurately preserve the essential characteristics of the crystal structure.
[0069] Step S2024 , determining the initial atom pair distances between each atom and its neighboring atoms based on the initial spatial positions of each atom and its neighboring atoms.
[0070] The initial atomic pair distance between each atom and its neighboring atoms can be the Euclidean distance calculated using the initial spatial positions of each atom and its neighboring atoms. Of course, it is not limited to the Euclidean distance, and can also be other distances, for example, the Hamming distance, the Manhattan distance, etc.
[0071] Step S2025 , based on the initial spatial position and candidate spatial positions of each atom and its neighboring atoms, distance tuning processing is performed on each initial atom pair distance to determine each atom pair distance.
[0072] Since the original crystal structure contains several groups of symmetrically equivalent atomic pairs, the distances between them should be completely equal in three-dimensional space. By using the initial spatial positions and candidate spatial positions of each atom and its neighboring atoms, the distances of each initial atomic pair are distance-tuned to obtain symmetrically unequal atomic pair distances. In other words, the purpose of distance tuning is to obtain symmetrically unequal atomic pair distances. Subsequently, the target spatial positions of each atom in low-dimensional space are determined through the symmetrically unequal atomic pair distances, which can better maintain the geometric characteristics of the crystal structure itself and reduce the complexity of the data. Further, the target representation of the crystal structure can be simplified.
[0073] In an optional implementation, the above step S2023 further includes:
[0074] Step b1, obtaining pre-constructed symmetric transformation parameters.
[0075] Step b2: using the symmetry transformation parameters, performing a symmetry transformation on the initial spatial positions of each atom and its neighboring atoms to obtain candidate spatial positions of each atom and its neighboring atoms.
[0076] Symmetric transformation parameters are parameters used to perform position symmetric transformation; candidate spatial positions are spatial positions obtained after preliminary spatial position transformation. Specifically, symmetric transformation parameters can be obtained by symmetric matrix To represent, for example, the symmetric matrix It can be a three-dimensional symmetric matrix. The specific representation of the symmetric matrix is not limited in this application and can be flexibly adjusted according to actual needs. Used to represent symmetric matrices, is a special orthogonal group in three-dimensional space, consisting of all the The real matrix W is composed of two conditions, one of which is orthogonality, that is, ,in, is the transposed matrix of W, is the unit matrix; another condition is that the determinant is 1, that is, .
[0077] Continuing with the previous example, if the initial spatial position of each atom and its neighboring atoms is represented by a three-dimensional coordinate vector, then the initial spatial position of each atom and its neighboring atoms is represented by the matrix It can be expressed as follows:
[0078]
[0079] Among them, the x-axis, y-axis and z-axis are the basic orthogonal coordinate axes of three-dimensional space, which follow the right-hand rule to define the direction and are used to uniquely determine the spatial position of atoms. 、 as well as is used to represent the three-dimensional coordinate vector of the first atom, and N is used to represent the total number of all atoms and their neighboring atoms. In this way, the process of performing symmetric transformation on the initial spatial positions of each atom and its neighboring atoms to obtain the candidate spatial positions of each atom and its neighboring atoms can be expressed as:
[0080]
[0081] in, Used to represent the candidate spatial positions of each atom and its neighboring atoms.
[0082] The initial spatial positions of each atom and its neighboring atoms are symmetric transformed using symmetry transformation parameters, so that the obtained candidate spatial positions of each atom and its neighboring atoms can be used to construct constraint conditions, and further the distances between each atomic pair can be determined more accurately, further ensuring the physical rationality of the dimensionality reduction representation of the crystal structure.
[0083] In an optional implementation, the above step S2025 includes:
[0084] In step c1, constraints are constructed using the positional relationship between the initial spatial position of each atom and its neighboring atoms and the candidate spatial positions.
[0085] Step c2: Under the constraints of the constraints, distance tuning processing is performed on the initial atomic pair distances to determine the distances of each atomic pair.
[0086] Crystal structures contain multiple symmetrical and equivalent atomic pairs that are identical in high-dimensional space (e.g., three-dimensional space). To preserve symmetry in low-dimensional space and provide a more concise representation of the crystal structure, distance optimization is performed on these symmetrical and equivalent atomic pairs to retain symmetrical and non-equivalent atomic pairs. The atomic pair distances of these symmetrical and non-equivalent atomic pairs are then used to determine the target spatial position of each atom.
[0087] The initial space and candidate space positions of each atom and its neighboring atoms can be used to construct constraints more reasonably. At the same time, under the constraints of the constraints, the distances of each initial atom pair are optimized to obtain multiple symmetrical but not equivalent atom pair distances.
[0088] In an optional embodiment, the above-mentioned step c1 includes: determining the candidate atom pair distance between each atom and its neighboring atoms based on the candidate spatial position of each atom and the candidate spatial position of its neighboring atoms; and determining that the initial atom pair distance between each atom and its neighboring atoms and the candidate atom pair distance are equal as a constraint condition.
[0089] As a specific example, the atom and its neighboring atoms The initial atomic pair distance can be expressed as ,atom and its neighboring atoms The candidate atom pair distance can be expressed as , so the constraints can be expressed as .
[0090] The constraint condition is established by making the initial atom pair distance of each atom equal to the candidate atom pair distance. Subsequently, the constraint condition is used to perform distance tuning on each initial atom pair distance, so as to further obtain multiple symmetric but non-equivalent atom pair distances.
[0091] In an optional embodiment, the above-mentioned step c2 includes: fusing the initial atom pair distances to obtain the target total distance; under the constraints of the constraints, optimizing the target total distance based on the initial atom pair distances to obtain the optimal target total distance; and determining the initial atom pair distances corresponding to the optimal target total distance as the atom pair distances.
[0092] The fusion processing of the distances of each initial atomic pair can be direct addition fusion or weighted fusion processing. This application does not limit this, and it can be flexibly selected according to actual conditions.
[0093] Under the constraints, the distances of each initial atom pair can be continuously adjusted, so that the target total distance can be adjusted, and then the optimal target total distance under the constraints can be obtained.
[0094] As a specific example, the distances of each initial atom pair can be directly added to construct a distance optimization function, which can be expressed as:
[0095]
[0096] in, Used to represent atoms and its neighboring atoms The initial atom pair distance is , and the distance optimization function is constrained to That is, under the constraints, the initial atom pair distance corresponding to the minimum sum of the initial original distances between each atom and its neighboring atoms is determined as the atom pair distance. It should be understood that the present application does not limit the optimization algorithm corresponding to the distance optimization function, which can be any suitable optimization algorithm, for example, the distance optimization function can be optimized and solved by Lagrange multiplication.
[0097] Step S203: Dimensionality reduction is performed on each initial spatial position using the distances between each atom pair to obtain the target spatial position corresponding to each atom and its neighboring atoms. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0098] Step S204: Use each target spatial position to represent the crystal structure and generate a target representation of the crystal structure. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0099] The method for representing the crystal structure of the present application uses the initial spatial position of each atom extracted from the initial representation file to determine the neighboring atoms corresponding to each atom, and then determines the atomic pair distance between each atom and its neighboring atoms by tuning the target total distance; using each atomic pair distance, the initial spatial position of each atom is subjected to dimensionality reduction processing, and the target spatial position of each atom can be obtained, so that the target spatial position of each atom can be used to represent the crystal structure and generate a target representation of the crystal structure. The present application reduces the dimensionality of the initial spatial position of each atom by the atomic pair distance between each atom and its neighboring atoms, which can not only map the high-dimensional initial spatial position to a low-dimensional, continuous and comparable vector representation, but also retain the geometric similarity and symmetry between crystal structures, thereby solving the problem of poor representation of the crystal structure, and further breaking through the limitations of traditional high-dimensional discrete structure representation in structure search, performance modeling and computational efficiency.
[0100] In this embodiment, a method for representing a crystal structure is provided, which can be used in computer devices such as servers and computers. Figure 3 is a flow chart of a method for representing a crystal structure according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps.
[0101] Step S301: Obtain the initial representation file of the crystal structure and extract the initial spatial position of each atom in the initial representation file. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0102] Step S302: Using the initial spatial position of each atom, determine the neighboring atoms corresponding to each atom, as well as the atomic pair distances between each atom and its neighboring atoms. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0103] Step S303 , performing dimensionality reduction processing on each initial spatial position using the distances of each atom pair to obtain the target spatial position corresponding to each atom and its neighboring atoms.
[0104] After the atom pair distance matrix is established, in order to reduce the complexity of the structural data and facilitate visualization, classification or machine learning modeling, the multidimensional scaling algorithm (MDS) can be used to reduce the dimensionality of the three-dimensional structure. Figure 4As shown in the figure, MDS is a classic nonlinear manifold learning method whose core goal is to embed high-dimensional data into a low-dimensional space while maintaining the distance relationship between data points in the original space as much as possible. Specifically in the modeling of crystal structures, the goal of MDS is to make the distances between atomic pairs as consistent as possible after dimensionality reduction. By optimizing the objective function, the MDS algorithm outputs a set of low-dimensional coordinate representations, where the position of each atom on its low-dimensional plane reflects its local geometric structure in the original dimensional space as much as possible. This not only preserves the core features of the structure, but also significantly reduces the data dimension, which is helpful for subsequent classification, clustering analysis, or graph neural network input of the structure.
[0105] Specifically, the above step S303 includes:
[0106] Step S3031 : normalize the distances of each atom pair to obtain the normalized distances of each atom pair.
[0107] As a specific example, normalizing the atomic pair distances by maximum value or by average interatomic distance can be used to normalize the atomic pair distances across all samples, ensuring that the atomic pair distances remain consistent across all samples. Because scale differences between different crystal structures can lead to different ranges of atomic pair distances, normalizing the atomic pair distances ensures comparability after dimensionality reduction.
[0108] Before normalizing the distances of each atom pair, a pre-set distance threshold can be used to screen the distances of each atom pair. For example, all atom pair distances less than the distance threshold are screened out based on the distance threshold. The atom pairs corresponding to the remaining atom pair distances are considered to have potential chemical interactions or local structural dependencies. All atom pair distances that meet the distance threshold screening conditions can be used to construct an atom pair distance matrix. The atom pair distance matrix is a symmetric sparse matrix that records the local geometric information between atoms. The atom pair distance matrix plays a role similar to a "graph structure" in this scheme, providing key geometric constraints for subsequent dimensionality reduction. As a specific example, the pre-set distance threshold can be between 1.5 angstroms (Å) and 3.5Å. Of course, the pre-set distance threshold is not limited to between 1.5.Å and 3.5Å, and can also be other distance thresholds.
[0109] Step S3032 , performing dimensionality reduction processing on the initial spatial positions of each atom and its neighboring atoms, and determining the target atom pair distance having the smallest difference from the normalized distance of the atom pair.
[0110] There are various methods for reducing the dimensionality of the initial spatial positions of each atom and its neighboring atoms. For example, an atom-pair distance matrix can be used to reduce the dimensionality of the initial spatial positions of each atom and its neighboring atoms. Another example is a graph neural network, which can be used to reduce the dimensionality of the initial spatial positions of each atom and its neighboring atoms.
[0111] Step S3033: Determine the target spatial position corresponding to each atom and its neighboring atoms according to the distance between each target atom pair.
[0112] As a specific example, after determining the target atom pair distance, the two spatial positions corresponding to the target atom pair distance can be used as the target spatial positions of the corresponding atom and its neighboring atoms.
[0113] As a specific example, after obtaining the atom pair distance matrix, in order to reduce the representation dimension of the crystal structure and maintain the geometric characteristics of the structure itself, the initial spatial position of each atom can be reduced in dimension based on the MDS algorithm. The specific process can be:
[0114] First, construct the target stress function:
[0115]
[0116] in, is the matrix element in the atom pair distance matrix, that is, the normalized distance between the atom pairs. For atoms The spatial position of the target in low-dimensional space, For atoms neighboring atoms The spatial position of the target in low-dimensional space, is the weight factor, which can usually be set to 1, but can also be weighted according to the distance to emphasize atoms and its neighboring atoms neighbor relationship.
[0117] Secondly, an optimization algorithm is used to optimize the target stress function. For example, the SMACOF (Scaling by MAjorizing a COmplicated Function) iterative optimization algorithm is used to optimize the target stress function. This iterative optimization algorithm can effectively process large-scale samples and improve the convergence speed by gradually approaching the optimal solution. It should be understood that in the initial solution, the atoms and its neighboring atoms The target spatial position of can be randomly initialized or the result of principal component analysis (PCA) preprocessing can be used as the initial value, and iterative optimization is performed to finally obtain the target spatial position of each atom and its neighboring atoms.
[0118] Step S304 : representing the crystal structure using each target spatial position to generate a target representation of the crystal structure.
[0119] Specifically, the above step S304 includes:
[0120] Step S3041 , performing projection processing on multiple projection planes on each target spatial position, to obtain multiple projection spatial positions under each projection plane, and the projected atomic pair distances between each atom and its neighboring atoms.
[0121] As a specific example, if each target spatial position is a three-dimensional coordinate after dimensionality reduction, each target spatial position can be projected to the xy plane, xz plane and yz plane respectively. After projection, the projection spatial position corresponding to each target spatial position in the xy plane can be obtained, and the projection spatial position corresponding to each target spatial position in the xz plane can also be obtained. The projection spatial position corresponding to each target spatial position in the xz plane can also be obtained.
[0122] Continuing with the previous example, after obtaining the projected spatial positions corresponding to each target spatial position in the xy, xz, and yz planes, we can use these projected spatial positions to determine the projected atom-pair distances between each atom and its neighbors in the xy plane, the projected atom-pair distances between each atom and its neighbors in the xz plane, and the projected atom-pair distances between each atom and its neighbors in the yz plane. In other words, each atom's projected spatial position and projected atom-pair distance are determined for each projection plane.
[0123] Step S3042: determining a plurality of target projection spatial positions under the target projection plane according to the number of projected atom pairs under each projection plane whose distance is greater than a first preset threshold.
[0124] Continuing with the previous example, based on the projected atom pair distances under each projection plane, we can obtain the number M1 of atom pairs projected on the xy plane whose distances are greater than a first preset threshold; the number M2 of atom pairs projected on the xz plane whose distances are greater than the first preset threshold; and the number M3 of atom pairs projected on the yz plane whose distances are greater than the first preset threshold. For example, if M1 is greater than M2, and M1 is greater than M3, then the xy plane is determined as the target projection plane, and each projection spatial position under the target projection plane is determined as the corresponding target projection spatial position.
[0125] It should be understood that since each projection surface corresponds to a different distance value range, each projection surface can correspond to a first preset threshold. Of course, if the distance value range corresponding to each projection surface is the same, multiple projection surfaces can correspond to the same first preset threshold. This application does not limit this and can be flexibly adjusted according to actual needs. This application does not limit the specific setting of the first preset threshold and can be flexibly adjusted according to actual needs.
[0126] Step S3043 , representing the crystal structure according to multiple target projection space positions to generate a target representation of the crystal structure.
[0127] As a specific example, multiple target projection space positions can be input into a target structure file to form a target representation of the crystal structure. The target projection space positions further reduce the dimensionality of the target space positions, further reducing the complexity of the structural data and facilitating visualization, classification, or machine learning modeling.
[0128] The spatial positions of multiple target projections under the target projection plane are determined by counting the number of projected atom pairs under each projection plane whose distance is greater than a first preset threshold. That is, the standard embedding dimension is selected through the projection principle, which can facilitate subsequent visualization and modeling.
[0129] As an optional implementation, the above step S3043 further includes:
[0130] Step d1, determining the target projected atom pair distance between each atom and its neighboring atoms based on the target projected spatial position of each atom and its neighboring atoms.
[0131] Step d2: remove atoms whose target projection atom pair distance is greater than a second preset threshold, to obtain multiple target atoms.
[0132] Step d3, representing the crystal structure according to the target projection spatial position of each target atom, and generating a target representation of the crystal structure.
[0133] Atoms whose distance to the target projected atom is greater than a second preset threshold are identified as isolated atoms. Eliminating isolated atoms prevents isolated atoms (i.e., atoms that are too far away from other atoms) from affecting the quality of dimensionality reduction. Furthermore, when generating a low-dimensional target representation of the crystal structure, the integrity of the main connected subgraph is ensured, thereby enhancing the consistency of subsequent modeling. It should be understood that the specific setting of the second preset threshold is not limited in this application and can be flexibly adjusted according to actual needs.
[0134] The crystal structure representation method of the present application uses the initial spatial position of each atom extracted from the initial representation file to determine the neighboring atoms corresponding to each atom, and then determines the atomic pair distance between each atom and its neighboring atoms; uses each atomic pair distance to perform dimensionality reduction processing on the initial spatial position of each atom to obtain the target spatial position of each atom, and processes the target spatial position of each atom and its neighboring atoms by projection processing to determine the target projection spatial position of each atom and its neighboring atoms, and uses the size relationship between the target projection atomic pair distance and the second preset threshold to eliminate isolated atoms, so that the target projection spatial position of each target atom can be used to represent the crystal structure and generate a target representation of the crystal structure. In this way, not only can the high-dimensional initial spatial position be mapped into a low-dimensional, continuous and comparable vector representation, but also the geometric similarity and symmetry between crystal structures can be retained, thereby solving the problem of poor representation effect of crystal structure, and further breaking through the limitations of traditional high-dimensional discrete structure representation in structure search, performance modeling and computational efficiency.
[0135] As a specific example, Figure 4 and Figure 5 As shown, a method for representing carbon crystal structure based on manifold learning is shown, taking carbon crystal structure as an example. This method can achieve a low-dimensional, continuous, comparable, and inputtable unified expression of complex carbon material structures, breaking through the limitations of traditional high-dimensional discrete structure representation in structure search, performance modeling, and computational efficiency. Based on the carbon atomic coordinates and lattice information of carbon materials, this method first extracts local structural features and adjacency relationships, and then performs nonlinear dimensionality reduction through manifold learning methods to generate a target representation of a low-dimensional carbon crystal structure that retains structural similarity and geometric properties, while maintaining the symmetry of the crystal itself during the generation process. The template representation of the carbon crystal structure can be used for application scenarios such as indexing and retrieval of material databases, structural classification and clustering, supervised / self-supervised modeling, input space of generative models, material recommendation, and optimization design, and specifically includes the following steps.
[0136] Step S501: data preprocessing.
[0137] A carbon crystal structure file is input into a computer to extract the high-dimensional coordinate information of each carbon atom in the carbon crystal structure file (i.e., the initial spatial position shown above). A carbon crystal structure file typically contains key information such as carbon atom type, three-dimensional coordinates, and lattice parameters. When reading the carbon crystal structure file, the computer first parses the file format and determines a preset extraction strategy corresponding to the file format. Finally, using the preset extraction strategy, the computer extracts the three-dimensional coordinate information of all carbon atoms in the carbon crystal structure file. For periodic crystal structures such as graphene and diamond, the unit cell parameters, including lattice constants (a, b, c) and lattice angles (α, β, γ), are further read to facilitate coordinate transformation or cell expansion. In non-periodic carbon structures, such as carbon clusters and fullerenes (e.g., C60), the unit cell information cannot be relied upon to locate carbon atoms because their structures are inherently non-periodic. Instead, the three-dimensional coordinate information of all carbon atoms is used to calculate the geometric center of all carbon atoms, i.e., the center of mass of all carbon atom coordinates, and this is used as the new reference origin. Afterwards, the positions of all carbon atoms are coordinate-translated so that the carbon crystal structure is represented with the geometric center as the origin. This not only helps to compare the consistency between structures, but also improves the effect of subsequent manifold learning.
[0138] Before generating the target representation of the carbon crystal structure, the data is fully and standardized preprocessed. The goal is to extract unified and standardized information from carbon crystal structure files of different sources or formats so that subsequent algorithms can run smoothly and maintain efficiency and accuracy.
[0139] Step S502: extracting carbon crystal structure features.
[0140] For many carbon crystal structures, especially highly symmetric carbon structures (such as cubic diamond, hexagonal graphite, etc.), space group symmetry is the basic element that constitutes the properties of the material. By introducing the space group symmetry constraint mechanism, the physical rationality of the dimensionality reduction representation can be ensured. Specifically, the original three-dimensional crystal structure contains several groups of symmetrically equivalent carbon atom pairs, and the distances between them should be exactly the same in three-dimensional space. In order for the two-dimensional planar structure after dimensionality reduction to retain this symmetry, it is necessary to ensure that the distances of all symmetrically equivalent carbon atom pairs in the two-dimensional plane must also remain consistent. In this way, by constructing a distance optimization function and constraints, the carbon atom pair distances between each carbon atom and its neighboring carbon atoms are determined. This not only enhances the structural rationality of the dimensionality reduction representation, but also provides a more reliable input representation for subsequent symmetry-sensitive machine learning models. Among them, the distance optimization function and constraints can be expressed as follows:
[0141]
[0142] .
[0143] After determining the carbon atom pair distances between each carbon atom and its neighboring carbon atoms, all carbon atom pairs with distances less than the distance threshold can be screened out using a pre-set distance threshold. If the distance is less than the pre-set distance threshold, it is considered that the carbon atom pair has potential chemical interactions or local structural dependencies. All carbon atom pair distances that meet the conditions will be used to construct a carbon atom pair distance matrix, which is a symmetric sparse matrix that records the local geometric information between carbon atoms. It plays a role similar to a "graph structure" in this method, providing key geometric constraints for subsequent dimensionality reduction. It is worth noting that, due to the influence of the periodic boundary conditions of carbon crystals, there may be multiple distances between two carbon atoms. In order to include as much crystal structure information as possible, the same carbon atom can be processed by cell expansion. That is, the same carbon atom that was originally in different lattices will be treated as different carbon atoms in the same "large lattice" after cell expansion.
[0144] Step S503: Manifold learning reduces the representation dimension of the crystal structure and generates a target representation of the crystal structure.
[0145] Step S5031: Since the scale differences of different crystal structures may lead to different ranges of distance matrix values, maximum value normalization or standardization based on the average carbon atomic distance is used to normalize the matrix elements in the carbon atom pair distance matrix so that the average carbon atomic distance of all samples remains consistent.
[0146] Step S5032: Construct target stress function .
[0147] Step S5033: Use the SMACOF iterative optimization algorithm to solve and obtain the target spatial position of each carbon atom.
[0148] In step S5034, projection processing of multiple projection planes is performed on each target spatial position to obtain multiple projection spatial positions under each projection plane and the projection atomic pair distances between each atom and its neighboring atoms. Based on the number of projection atomic pair distances under each projection plane that are greater than a first preset threshold, the multiple target projection spatial positions under the target projection plane are determined.
[0149] Step S5035, using the target projection spatial position of each atom and its neighboring atoms, determine the target projection atom pair distance between each atom and its neighboring atoms; eliminate atoms whose target projection atom pair distance is greater than a second preset threshold to obtain multiple target atoms; use the target projection spatial position of each target atom to represent the crystal structure and generate a target representation of the crystal structure.
[0150] Through the above processing, the present application can effectively map high-dimensional atomic arrangements to low-dimensional space while retaining the local structural similarity of the original carbon crystals, generating continuous and comparable structural feature vectors, and providing a high-quality input data foundation for subsequent machine learning, material screening, performance prediction and other applications.
[0151] Step S504: performing downstream model application based on the target representation of the low-dimensional carbon crystal structure.
[0152] 1) Input characteristics of carbon material property prediction model
[0153] The low-dimensional target representation is used as the input feature of the machine learning model (such as support vector machine, graph neural network, Transformer, etc.), and the model is trained to predict the key physical and chemical properties of carbon materials, such as band width, electron mobility, specific surface area, thermal stability, etc.
[0154] 2) Reverse design and generation of carbon crystals
[0155] Combined with generative models (such as variational autoencoders, diffusion models, etc.), low-dimensional target representations are used as spatial constraints to perform inverse generation and optimization searches of carbon structures, and to design new carbon material structures that meet specific performance indicators.
[0156] 3) Unsupervised classification and cluster analysis of carbon structure
[0157] Unsupervised learning methods such as K-means, DBSCAN, and spectral clustering are applied in low-dimensional space to automatically classify and cluster carbon crystal structures, and to explore the potential evolutionary relationships, stability partitions, or functional partitioning rules in carbon structure systems.
[0158] Through the above applications, this application not only realizes an efficient and comparable representation method for carbon crystal structure, but also establishes a complete machine learning modeling link from structure representation to material discovery, greatly improving the intelligence level and efficiency of carbon material research and development.
[0159] The embodiment of the present application also provides a crystal structure representation device, such as Figure 6 As shown, the device includes an acquisition module 610, a determination module 620, a dimension reduction processing module 630 and a structure representation module 640.
[0160] An acquisition module 610 is configured to acquire an initial representation file of the crystal structure and extract the initial spatial position of each atom in the initial representation file;
[0161] a determination module 620 for determining the neighboring atoms corresponding to each atom and the atomic pair distances between each atom and its neighboring atoms using the initial spatial position of each atom;
[0162] A dimensionality reduction processing module 630 is used to perform dimensionality reduction processing on each initial spatial position using the distances between each atom pair to obtain the target spatial position corresponding to each atom and its neighboring atoms;
[0163] The structure representation module 640 is used to represent the crystal structure using each target spatial position to generate a target representation of the crystal structure.
[0164] As an optional implementation, the acquisition module 610 is also used to obtain the atomic arrangement type of the crystal structure; if the atomic arrangement type is a periodic type, the coordinates of each atom extracted from the initial representation file are determined as the initial spatial position of each atom; if the atomic arrangement type is a non-periodic type, the coordinates of each atom extracted from the initial representation file are converted into a coordinate system to obtain the initial spatial position of each atom.
[0165] As an optional implementation, the acquisition module 610 is further used to determine the center of mass using the coordinates of each atom extracted from the initial representation file; using the center of mass as the coordinate origin, the coordinates of each atom are translated to obtain the initial spatial position of each atom.
[0166] As an optional implementation, the determination module 620 is further configured to expand a preset distance outward from any target atom among the atoms to obtain a target region; and determine the atoms in the target region as neighboring atoms of the target atom.
[0167] As an optional implementation, the determination module 620 is also used to perform symmetric transformation processing on the initial spatial positions of each atom and its neighboring atoms to obtain candidate spatial positions of each atom and its neighboring atoms; based on the initial spatial positions of each atom and its neighboring atoms, determine the initial atomic pair distances between each atom and its neighboring atoms; based on the positional relationship between the initial spatial positions of each atom and its neighboring atoms and the candidate spatial positions, perform distance tuning processing on each initial atomic pair distance to determine each atomic pair distance.
[0168] As an optional implementation, the determination module 620 is also used to obtain pre-constructed symmetry transformation parameters; using the symmetry transformation parameters, the initial spatial positions of each atom and its neighboring atoms are symmetric transformed to obtain candidate spatial positions of each atom and its neighboring atoms.
[0169] As an optional implementation, the determination module 620 is also used to construct constraint conditions using the positional relationship between the initial spatial position and the candidate spatial position of each atom and its neighboring atoms; under the constraints of the constraint conditions, the distance between each initial atom pair is optimized to determine the distance between each atom pair.
[0170] As an optional embodiment, the determination module 620 is also used to determine the candidate atom pair distances between each atom and its neighboring atoms based on the positional relationship between the candidate spatial positions of each atom and the candidate spatial positions of its neighboring atoms; and to determine the constraint conditions by making the initial atom pair distances between each atom and its neighboring atoms and the candidate atom pair distances equal.
[0171] As an optional implementation, the determination module 620 is further used to fuse the initial atom pair distances to obtain the target total distance; under the constraints of the constraints, the target total distance is distance-tuned based on the initial atom pair distances to obtain the optimal target total distance; and the initial atom pair distances corresponding to the optimal target total distance are determined as the atom pair distances.
[0172] As an optional implementation, the dimensionality reduction processing module 630 is also used to perform dimensionality reduction processing on the initial spatial positions of each atom and its neighboring atoms, determine the target atom pair distance with the smallest difference from the normalized distance of the atom pair; and determine the target spatial position corresponding to each atom and its neighboring atoms according to each target atom pair distance.
[0173] As an optional implementation, the structure representation module 640 is also used to perform projection processing on multiple projection planes for each target spatial position to obtain multiple projection spatial positions under each projection plane, as well as the projected atomic pair distances between each atom and its neighboring atoms; based on the number of projected atomic pair distances under each projection plane that are greater than a first preset threshold, multiple target projection spatial positions under the target projection plane are determined; the crystal structure is represented according to the multiple target projection spatial positions to generate a target representation of the crystal structure.
[0174] As an optional implementation, the structure representation module 640 is also used to determine the target projection atom pair distance between each atom and its neighboring atoms based on the target projection spatial position of each atom and its neighboring atoms; eliminate atoms whose target projection atom pair distance is greater than a second preset threshold to obtain multiple target atoms; represent the crystal structure according to the target projection spatial position of each target atom to generate a target representation of the crystal structure.
[0175] For the description of the features in the embodiment corresponding to the crystal structure representation device, reference can be made to the relevant description of the embodiment corresponding to the crystal structure representation method, which will not be repeated here.
[0176] The embodiment of the present application also provides a computer device, such as Figure 7 As shown, it includes a memory 710 and a processor 720. The memory 710 stores a computer program, and the processor 720 is configured to run the computer program to execute the steps in any of the above-mentioned crystal structure representation method embodiments.
[0177] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned crystal structure representation method embodiments when run.
[0178] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0179] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned crystal structure representation method embodiments are implemented.
[0180] An embodiment of the present application further provides another computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned crystal structure representation method embodiments are implemented.
[0181] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0182] The above is a detailed introduction to a method for representing a crystal structure, a computer device, and a storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that, for those skilled in the art, without departing from the principles of the present application, several improvements and modifications may be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for representing a crystal structure, characterized in that: include: Obtaining an initial representation file of the crystal structure, and extracting the initial spatial position of each atom in the initial representation file; Determining the neighboring atoms corresponding to each atom and the atomic pair distances between each atom and its neighboring atoms using the initial spatial positions of each atom; Performing dimensionality reduction processing on each of the initial spatial positions using the distances of each of the atomic pairs to obtain target spatial positions corresponding to each of the atoms and its neighboring atoms; Representing the crystal structure using each of the target spatial positions to generate a target representation of the crystal structure, wherein the target representation is used to describe the composition of the crystal structure; Performing dimensionality reduction processing on each of the initial spatial positions using each of the atom pair distances to obtain target spatial positions corresponding to each of the atoms and its neighboring atoms, including: normalizing each of the atom pair distances to obtain each normalized atom pair distance; performing dimensionality reduction processing on the initial spatial positions of each of the atoms and its neighboring atoms to determine a target atom pair distance having the smallest difference from the normalized atom pair distance; and determining the target spatial positions corresponding to each of the atoms and its neighboring atoms according to each of the target atom pair distances; The process of determining the target spatial position includes: Constructing the target stress function ,in, For atoms and its neighboring atoms The normalized distance between atomic pairs, For atoms The spatial position of the target in low-dimensional space, For atoms neighboring atoms The spatial position of the target in low-dimensional space, is the weight factor; The target stress function is optimized and solved by using an optimization solution algorithm to obtain the target spatial position corresponding to each atom and its neighboring atoms.
2. The method according to claim 1, characterized in that Extracting the initial spatial position of each atom in the initial representation file includes: Obtaining the atomic arrangement type of the crystal structure; If the atomic arrangement type is a periodic type, the coordinates of each atom extracted from the initial representation file are determined as the initial spatial position of each atom; If the atomic arrangement type is a non-periodic type, coordinate transformation is performed on the coordinates of each atom extracted from the initial representation file to obtain the initial spatial position of each atom.
3. The method according to claim 2, characterized in that Performing coordinate transformation on the coordinates of each of the atoms extracted from the initial representation file to obtain the initial spatial position of each of the atoms includes: determining a center of mass using coordinates of each of the atoms extracted from the initial representation file; Taking the mass center as the coordinate origin, the coordinates of each atom are translated to obtain the initial spatial position of each atom.
4. The method according to claim 1, wherein Determining neighboring atoms corresponding to each atom using the initial spatial position of each atom includes: For any target atom among the atoms, expanding outward by a preset distance with the target atom as the center to obtain a target area; Atoms in the target region are determined as neighboring atoms of the target atom.
5. The method according to any one of claims 1 or 4, characterized in that Determining the atom pair distance between each of the atoms and its neighboring atoms comprises: Performing symmetric transformation processing on the initial spatial positions of each atom and its neighboring atoms to obtain candidate spatial positions of each atom and its neighboring atoms; Determining initial atom pair distances between each atom and its neighboring atoms based on the initial spatial positions of each atom and its neighboring atoms; Based on the initial spatial positions and candidate spatial positions of each atom and its neighboring atoms, distance tuning processing is performed on each of the initial atom pair distances to determine each of the atom pair distances.
6. The method according to claim 5, characterized in that Performing symmetric transformation processing on the initial spatial positions of each atom and its neighboring atoms to obtain candidate spatial positions of each atom and its neighboring atoms includes: Get pre-built symmetry transformation parameters; The symmetry transformation parameters are used to perform a symmetry transformation on the initial spatial positions of each atom and its neighboring atoms to obtain candidate spatial positions of each atom and its neighboring atoms.
7. The method according to claim 5, characterized in that Based on the initial spatial positions and candidate spatial positions of each atom and its neighboring atoms, performing distance tuning processing on each of the initial atom pair distances to determine each of the atom pair distances, comprising: Constructing constraint conditions using the positional relationship between the initial spatial position and the candidate spatial position of each atom and its neighboring atoms; Under the constraint of the constraint condition, distance tuning processing is performed on each of the initial atom pair distances to determine each of the atom pair distances.
8. The method according to claim 7, characterized in that The constraint conditions are constructed by utilizing the positional relationship between the initial spatial position and the candidate spatial position of each atom and its neighboring atoms, including: Determining candidate atom pair distances between each atom and its neighboring atoms based on the candidate spatial positions of each atom and the candidate spatial positions of its neighboring atoms; The constraint condition is determined by making the initial atom pair distance and the candidate atom pair distance between each atom and its neighboring atoms equal.
9. The method according to claim 7, characterized in that Under the constraint conditions, performing distance tuning processing on each of the initial atom pair distances to determine each of the atom pair distances includes: Performing fusion processing on the initial atomic pair distances to obtain a target total distance; Under the constraint conditions, performing distance tuning processing on the target total distance based on the initial atom pair distances to obtain an optimal target total distance; The initial atom pair distances corresponding to the optimal target total distance are determined as the atom pair distances.
10. The method according to claim 1, characterized in that Representing the crystal structure using each of the target spatial positions to generate a target representation of the crystal structure includes: Performing projection processing on multiple projection planes on each target spatial position to obtain multiple projection spatial positions under each projection plane, and projected atomic pair distances between each atom and its neighboring atoms; Determining a plurality of target projection spatial positions under the target projection plane according to the number of projection atom pairs under each projection plane whose distance is greater than a first preset threshold; The crystal structure is represented according to a plurality of target projection space positions to generate a target representation of the crystal structure.
11. The method according to claim 10, characterized in that Representing the crystal structure according to the plurality of target projection space positions to generate a target representation of the crystal structure includes: Determining target projected atom pair distances between each atom and its neighboring atoms based on target projected spatial positions of each atom and its neighboring atoms; Eliminate the atoms whose distances to the target projection atoms are greater than a second preset threshold, to obtain multiple target atoms; The crystal structure is represented according to the target projected spatial position of each target atom to generate a target representation of the crystal structure.
12. A computer device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the method for representing a crystal structure according to any one of claims 1 to 11 when executing the computer program.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method for representing a crystal structure according to any one of claims 1 to 11 are implemented.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for representing a crystal structure according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Inter-atomic interaction potential construction method and system based on graph neural network
CN117672415A
Thermal conductivity prediction method and device, computer equipment and storage medium
CN118983035A