/
core.py
1451 lines (1140 loc) · 42.1 KB
/
core.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import pyscal.ccore as pc
import pyscal.traj_process as ptp
import os
import numpy as np
import warnings
"""
Definitions of class Atom.
"""
class Atom(pc.Atom):
"""
A c++ class for holding the properties of a single atom. Various properties of the atom
can be accessed through member functions which are described below in detail. Atoms can
be created individually or directly by reading in a file. Check the examples for more
details on how atoms are created. For creating atoms directly from an input file check
the documentation of ``System`` class.
Although an ``Atom`` object can be created independently, ``Atom`` should be thought of
inherently as members of the ``System`` class. All the properties that define an atom are
relative to the ``System`` class. ``System`` has a list of all atoms using which the neighbors
of an ``Atom``, if its solid and so on can be calculated. All the calculated properties of an
atom which depend on any other atom, hence should be calculated through ``System``. Please
check the examples section of the documentation for more details.
Parameters
----------
pos : list of floats of length 3, default [0,0,0]
position of the ``Atom``
id : int, default 0
id of the ``Atom``
Examples
--------
>>> #method 1 - individually
>>> atom = Atom()
>>> #now set positions of the atoms
>>> atom.set_x([23.0, 45.2, 34.2])
>>> #now set id
>>> atom.set_id(23)
See also
--------
get_pos
set_pos
set_id
get_id
System
"""
def __init__(self, pos=[0,0,0], id=0, type=1):
"""
Deafults args
"""
pc.Atom.__init__(self)
pc.Atom.set_x(self, pos)
pc.Atom.set_id(self, id)
pc.Atom.set_type(self, type)
#now wrapping for other normal functions
def get_pos(self):
"""
Get the position of the ``Atom``. Meaningful values are only returned if the atoms are
set before using this function.
Parameters
----------
None
Returns
-------
pos : array of float
contains the position of the atom in the form ``[posx, posy, posz]``, where
``posx`` is the x coordinate of the atom, ``posy`` is the y coordinate and ``posz``
is the z coordinate.
Examples
--------
>>> atom = Atom()
>>> x = atom.get_pos()
See also
--------
set_pos
Atom
System
"""
x = pc.Atom.get_x(self)
return x
def set_pos(self, pos):
"""
Set the position of the ``Atom``.
Parameters
----------
pos : list of floats of length 3
list contains three values which are the position coordinates of the ``Atom`` with
respect to the simulation box.
Returns
-------
None
Examples
--------
>>> atom = Atom()
>>> x = atom.set_pos([23.0, 45.2, 34.2])
See also
--------
get_pos
"""
if len(pos) == 3:
try:
pos = np.array(pos).astype(float)
pc.Atom.set_x(self, pos)
except:
raise TypeError("Position values should be float.")
else:
raise ValueError("Length of position array should be 3.")
def get_solid(self):
"""
Find if an atom is solid or not.
Parameters
----------
None
Returns
-------
issolid : int
1 if solid
0 otherwise
"""
return pc.Atom.get_solid(self)
def get_structure(self):
"""
Get the structure of an atom.
Parameters
----------
None
Returns
-------
structure : int
structural value. As of now it is not calculated using
any inbuilt function.
"""
return pc.Atom.get_structure(self)
def set_solid(self, issolid):
"""
Find if an atom is solid or not.
Parameters
----------
issolid : int, 0 or 1
1 if the atom is set to solid, 0 otherwise
Returns
-------
None
"""
if int(issolid) in [0, 1]:
pc.Atom.set_solid(self, int(issolid))
else:
raise ValueError("Value of issolid should be either 0 or 1")
def set_structure(self, structure):
"""
Set the structure of an atom.
Parameters
----------
structure : int
structure of the atom
Returns
-------
None
"""
pc.Atom.set_structure(self, structure)
def get_volume(self, averaged = False):
"""
Get the voronoi colume of the atom. Meaningful values are only returned if the neighbors
are calculated using voronoi method.
Parameters
----------
averaged : bool, default False
If True, averaged version of the volume is returned.
Returns
-------
volume : float
voronoi volume of the atom.
Examples
--------
>>> volume = atom.get_volume()
"""
if averaged:
vol = pc.Atom.get_avgvolume(self)
else:
vol = pc.Atom.get_volume(self)
return vol
def get_cluster(self):
"""
Get the cluster properties of the atom. The cluster properties of the atom
include four different properties as listed below. The properties are only
returned if they are calculated before using ``calculate_nucsize`` function
before.
Parameters
----------
None
Returns
-------
cluster : list of int of length 4
``cluster`` is a vector of four values. they are described below-
``issolid`` : which is 1 if the atom is solid, 0 otherwise
``issurface`` : 1 if the atom has liquid neighbors, 0 otherwise
``lcluster`` : 1 if the atom belongs to the largest cluster, 0 otherwise
``belongsto`` : which gives the id of the cluster that the atom belongs to.
Examples
--------
>>> cinfo = atom.get_cluster()
See also
--------
set_nucsize_parameters
calculate_nucsize
"""
x = pc.Atom.get_cluster(self)
return x
def get_neighbors(self):
"""
Returns the neighbors indices of the atom. The list returned consistes of the indices
of neighbor atom which indicate their position in the list of all atoms. The neighbors
of an atom can be calculated from the ``System`` object that it belongs to.
Parameters
----------
None
Returns
-------
x : list of int
list of neighbor indices of the atom.
Examples
--------
neighbors = atom.get_neighbors()
See also
--------
set_neighbors
set_neighborweights
get_neighborweights
"""
return pc.Atom.get_neighbors(self)
def set_neighbors(self, neighs):
"""
Set the neighbors of an atom manually.
Parameters
----------
neighs : list of ints
index of the neighbor atoms
Returns
-------
None
Examples
--------
atom.set_neighbors([0,23,11,22,334,112,11])
See also
--------
get_neighbors
set_neighborweights
get_neighborweights
"""
pc.Atom.set_neighbors(self, neighs)
def get_coordination(self):
"""
Returns the coordination number of the atom. ``System.get_neighbors`` function
has to be used before accessing coordination numbers.
Parameters
----------
None
Returns
-------
cn : int
coordination number of the atom.
Examples
--------
neighbors = atom.get_neighbors()
See also
--------
set_neighbors
set_neighborweights
get_neighborweights
"""
return pc.Atom.get_coordination(self)
def get_neighborweights(self):
"""
Get the neighbor weights of the atom. The neighbor weights are used to weight the
contribution of each neighboring atom towards the q value of the host atom. By
default, each neighbor has a weight of 1 each. However, if the neighbors are calculated
using the ``System.get_neighbors(method='voronoi')``, each neighbor atom gets a
weight proportional to the face area shared between the neighboring atom and the
host atom (or higher powers - check the documentation). This can sometimes be helpful
in controlling the contribution of atoms with low face areas due to the thermal vibrations at high temperature.
Parameters
----------
None
Returns
-------
x : list of float
neighbor weights
Examples
--------
>>> weights = atom.get_neighborweights()
See also
--------
get_neighbors
set_neighbors
set_neighborweights
"""
return pc.Atom.get_neighborweights(self)
def set_neighborweights(self, weights):
"""
Set the neighbor weights of an atom.
Parameters
----------
weights : list of floats
weights of the neighbor atoms
Returns
-------
None
Examples
--------
>>> atom.set_neighborweights([0.1, 0.2, 0.2, 0.4, 0.1])
See also
--------
get_neighbors
set_neighbors
set_neighborweights
"""
pc.Atom.set_neighborweights(self, weights)
def get_q(self, q, averaged = False):
"""
get q value of the atom. The q value can be either normal or can
be averaged according to Lechner, W, Dellago, C. JCP 129, 2008.
The averaged version can be obtained by using keyword
``averaged = True``.
Parameters
----------
q : int or list of int
number of the required q - from 2-12
averaged : bool, default False
If True, return the averaged q values,
If False, return the non averaged ones
Returns
-------
q : float or list of floats
The queried q value
Examples
--------
>>> q2 = atom.get_q(2, averaged = True)
>>> q24 = atom.get_q([2, 4])
See also
--------
set_q
get_aq
set_aq
"""
if isinstance(q, int):
if averaged:
rq = pc.Atom.get_aq(self, q)
else:
rq = pc.Atom.get_q(self, q)
return rq
else:
if averaged:
rq = [ pc.Atom.get_aq(self, qq) for qq in q ]
else:
rq = [ pc.Atom.get_q(self, qq) for qq in q ]
return rq
def set_q(self, q, d, averaged = False):
"""
set the q value of the atom. If ``averaged = True``, sets the averaged versions of
the q parameters.
Parameters
----------
q : int or list of ints
number of the required q - from 2-12
d : float or list of floats
the q value to set
averaged : bool, default False
If True, return the averaged q values,
If False, return the non averaged ones
Returns
-------
None
Examples
--------
>>> atom.set_q(2, 0.24, averaged = True)
>>> atom.set_q([2,4], [0.24, 0.05])
See also
--------
set_aq
get_aq
get_q
"""
if isinstance(q, int):
if averaged:
pc.Atom.set_aq(self, q, d)
else:
pc.Atom.set_q(self, q, d)
else:
if averaged:
for count, qq in enumerate(q):
pc.Atom.set_aq(self, qq, d[count])
else:
for count, qq in enumerate(q):
pc.Atom.set_q(self, qq, d[count])
def get_id(self):
"""
get the id of the atom.
Parameters
----------
None
Returns
-------
id : int
id of the atom
Examples
--------
>>> id = atom.get_id()
See also
--------
set_id
"""
return pc.Atom.get_id(self)
def set_id(self, idd):
"""
set the id of the atom.
Parameters
----------
idd : int
id of the atom
Returns
-------
None
Examples
--------
>>> atom.set_id(2)
See also
--------
get_id
"""
pc.Atom.set_id(self, idd)
def get_loc(self):
"""
get the location of the atom in the array of all atoms in ``System``
Parameters
----------
None
Returns
-------
loc : int
loc of the atom
Examples
--------
>>> loc = atom.get_loc()
See also
--------
set_loc
"""
return pc.Atom.get_loc(self)
def set_loc(self, idd):
"""
set the ``loc`` of the atom. When an atom is put back in the ``System``, it will
be reset if another atom exists in that ``loc``
Parameters
----------
idd : int
loc of the atom
Returns
-------
None
Examples
--------
>>> atom.set_loc(2)
See also
--------
get_loc
"""
warnings.warn("If the loc of atom is changed and set to system, it will overwrite the existing data, if any.")
pc.Atom.set_loc(self, idd)
def get_type(self):
"""
get the ``type`` (species) of the atom.
Parameters
----------
None
Returns
-------
type : int
species/type of the atom
Examples
--------
>>> t = atom.get_type()
See also
--------
set_type
"""
return pc.Atom.get_type(self)
def set_type(self, tt):
"""
set the type of the atom.
Parameters
----------
tt : int
type of the atom
Returns
-------
None
Examples
--------
>>> atom.set_type(2)
See also
--------
get_type
"""
if isinstance(tt, int):
pc.Atom.set_type(self, tt)
else:
raise ValueError("type value should be integer")
def get_vorovector(self):
"""
get the voronoi structure identification vector. Returns a
vector of the form ``(n3, n4, n5, n6)``, where ``n3`` is the number
of faces with 3 vertices, ``n4`` is the number of faces with 4
vertices and so on. This can be used to identify structures.
Parameters
----------
None
Returns
-------
vorovector : array like, int
array of the form (n3, n4, n5, n6)
"""
return pc.Atom.get_vorovector(self)
def get_facevertices(self):
"""
get the number of vertices of the voronoi face shared between an atom and its neighbors.
Returns a vector with number of entries equal to the number of neighbors.
The corresponding atom indices can be obtained through ``Atom.get_neighbors``
A shorter version of this vector
in a condensed form is available through ``Atom.get_vorovector``.
Parameters
----------
None
Returns
-------
facevertices : array like, int
array of the vertices
"""
return pc.Atom.get_facevertices(self)
#------------------------------------------------------------------------------------------------------------
"""
System class definitions
"""
#------------------------------------------------------------------------------------------------------------
class System(pc.System):
"""
A c++ class for holding the properties of a system. A `System` consists of two
major components - the simulation box and the atoms. All the associated variables
are then calculated over these.
A `System` can be set and populated by reading an input file in lammps dump format.
This enables for automatic reading of all atomic positions and the simulation box.
Examples
--------
>>> sys = System()
>>> sys.read_inputfile()
"""
def __init__(self):
self.initialized = True
pc.System.__init__(self)
def read_inputfile(self, filename, format="lammps-dump", frame=-1, compressed = False):
"""
Read input file containing the information of a time slice from a molecular dynamics
simulation.
The format of the input file is specified using the `format` keyword. Currently only
a `lammps-dump` file is supported. However, this restriction can easily be overcome
using the `assign_particles` method from system where a list of atoms and box vectors
are directly provided to the system.
`use_c` is no deprecated and no longer used to ease transition to python 3.
Parameters
----------
filename : string
name of the input file to be read in
format : string, `lammps-dump` or `poscar`
format of the input file
compressed : bool, default False
If True, force to read a `gz` compressed format. However, if a file ends with `.gz`
extension, it is automatically treated as a compressed file and this keyword is not
necessary
frame : int
If the trajectory contains more than one time slice, the slice can be specified
using the `frame` option. Alert: works only with `lammps-dump` format.
use_c : bool, default False, deprecated
If True, use the `read_particle_file` method from c++ module. This might be faster
but only accepts file format of `lammps-dump` type with a particular header layout.
Also `compressed` keyword doesnt work anymore. This keyword is deprecated and only
kept for compatibility reasons. Use of this keyword is not recommended.
Returns
-------
None
See Also
--------
assign_particles
"""
if format == 'lammps-dump':
if frame != -1:
#split the traj and returns set of filenames
filenames = ptp.split_traj_lammps_dump(filename, compressed=compressed)
#reassign filename
filename = filenames[frame]
if os.path.exists(filename):
atoms, boxdims, box, triclinic = ptp.read_lammps_dump(filename, compressed=compressed, check_triclinic=True, box_vectors=True)
pc.System.assign_particles(self, atoms, boxdims)
if triclinic:
#we have to input rotation matrix and the inverse rotation matrix
rot = box.T
rotinv = np.linalg.inv(rot)
pc.System.assign_triclinic_params(self, rot, rotinv)
else:
raise FileNotFoundError("input file not found")
#now remove filenames
for file in filenames:
os.remove(file)
elif os.path.exists(filename):
atoms, boxdims, box, triclinic = ptp.read_lammps_dump(filename, compressed=compressed, check_triclinic=True, box_vectors=True)
pc.System.assign_particles(self, atoms, boxdims)
if triclinic:
#we have to input rotation matrix and the inverse rotation matrix
rot = box.T
rotinv = np.linalg.inv(rot)
pc.System.assign_triclinic_params(self, rot, rotinv)
else:
raise FileNotFoundError("input file not found")
elif format == 'poscar':
if os.path.exists(filename):
atoms, boxdims = ptp.read_poscar(filename, compressed=compressed)
pc.System.assign_particles(self, atoms, boxdims)
else:
raise FileNotFoundError("input file not found")
else:
raise TypeError("format recieved an unknown option")
def assign_atoms(self, atoms, box):
"""
Assign atoms directly. Receive a vector of atom objects which is stored instead
of reading in the input file. If this method is used, there is no need of using
`read_inputfile` method. Also using this function allows for reading of multiple
file formats which are not supported by the inbuilt `read_inputfile` method.
Parameters
----------
atoms : list of `Atom` objects
list consisting of all atoms
box : list of list of floats
list which consists of the box dimensions in the format-
[[box_x_low, box_x_high], [box_y_low, box_y_high], [box_z_low, box_z_high]]
Returns
-------
None
See Also
--------
read_inputfile
"""
pc.System.assign_particles(self, atoms, box)
def calculate_rdf(self, histobins=100, histomin=0.0, histomax=None):
"""
Calculate the radial distribution function. It is calculated by finding distances
between all pairs of atoms and then creating a histogram from it.
Parameters
----------
histobins : int
number of bins in the histogram
histomin : float, optional
minimum value of the distance histogram, if not specified, 0.0 is taken as the
minimum.
histomax : float, optional
maximum value of the distance histogram. If not specified, the maximum value
in all pair distances is used.
Returns
-------
rdf : array of ints
Radial distribution function
r : array of floats
radius in distance units
"""
distances = pc.System.get_pairdistances(self)
if histomax == None:
histomax = max(distances)
hist, bin_edges = np.histogram(distances, bins=histobins, range=(histomin, histomax))
edgewidth = np.abs(bin_edges[1]-bin_edges[0])
hist = hist.astype(float)
r = bin_edges[:-1]
#get box density
boxvecs = pc.System.get_boxvecs(self)
vol = np.dot(np.cross(boxvecs[0], boxvecs[1]), boxvecs[2])
natoms = pc.System.get_nop(self)
rho = natoms/vol
shell_vols = (4./3.)*np.pi*((r+edgewidth)**3 - r**3)
shell_rho = hist/shell_vols
#now divide to get final value
rdf = shell_rho/rho
return rdf, r
def get_largestcluster(self):
"""
Get id of the the largest cluster. id is only available if the largest cluster has already
been found. Otherwise it returns the default values.
Parameters
----------
None
Returns
-------
clusterid : int
id of the largest cluster
See Also
--------
get_allneighbors
calculate_nucsize
set_nucsize_parameters
"""
return pc.System.get_largestcluster(self)
def set_nucsize_parameters(self, cutoff, minfrenkel, threshold, avgthreshold):
"""
Set the value of parameters for calculating the largest solid cluster in the
liquid, a detailed description of the order parameter can be found in
Diaz Leines et al, JCP 146(2017). http://doi.org/10.1063/1.4980082.
The number of atoms in the largest solid cluster in liquid is often used as an
order parameter in the study of nucleation during solidification. In order to
actually calculate the largest solid cluster, `calculate_nucsize` has to be
called after setting the parameters.
Parameters
----------
cutoff : float
cutoff distance for calculating neighbors
minfrenkel : int
Minimum number of solid bonds for an atom to be identified as
a solid.
threshold : double
The cutoff value of connection between two atoms for them to be def
ined as having a bond.
avgthreshold : double
Averaged value of connection between an atom and its neighbors for
an atom to be solid. This threshold is known to improve the solid-liquid
distinction in interfaces between solid and liquid.
Returns
-------
None
See Also
--------
calculate_nucsize
Examples
--------
>>> st.set_nucsize_parameters(7,0.5,0.5)
"""
pc.System.set_nucsize_parameters(self, cutoff, minfrenkel, threshold, avgthreshold)
def calculate_nucsize(self):
"""
Calculate the size of the largest cluster in the given system. Calculation
the size of the largest cluster needs various prerequisites that can be set
by the functions `set_nucsize_parameters`. A detailed description of the order
parameter can be found in Diaz Leines et al, JCP 146(2017).
http://doi.org/10.1063/1.4980082.
The number of atoms in the largest solid cluster in liquid is often used as an
order parameter in the study of nucleation during solidification.
Parameters
----------
None
Returns
-------
cluster size : int
size of the largest solid cluster in liquid (number of atoms)
"""
return pc.System.calculate_nucsize(self)
def get_atom(self, index):
"""
Get the `Atom` object at the queried position in the list of all atoms
in the `System`.
Parameters
----------
index : int
index of required atom in the list of all atoms.
Returns
-------
atom : Atom object
atom object at the queried position.
"""
atomc = pc.System.get_atom(self, index)
atom = self.copy_catom_to_atom(atomc)
return atom
def set_atom(self, atom):
"""
Return the atom to its original location after modification. For example, an
`Atom` at location `i` in the list of all atoms in `System` can be queried by,
`atom = System.get_atom(i)`, then any kind of modification, for example, the
position of the `Atom` can done by, `atom.set_x([2.3, 4.5, 4.5])`. After
modification, the `Atom` can be set back to its position in `System` by
`System.set_atom(atom)`.
Parameters
----------
atom : Atom
atom to be replaced
Returns
-------
None
"""
atomc = self.copy_atom_to_catom(atom)
pc.System.set_atom(self, atomc)
def get_atoms(self):
"""
Get a list of all `Atom` objects that belong to the system.
Parameters
----------
None